Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003
    Location
    Antwerp, Belgium
    Posts
    9

    Question Unanswered: Totals calculated too slowly for label on main form

    Hello all,

    I have another question. The situation is kinda difficult to explain so please bare with me...

    I have a form and a subform in MS Access 2000. On the footer of the subform I calculate two sums. Based on the difference between the two sums, a label should be visible. The problem is that the calculation takes apparantly too long. This results in incorrect showing of the result.
    On the main form i have a number indicating the minimum stock.
    On the sub form I calculate the total amount in stock, and the total amount ordered but not delivered. If the sum of these two is lower than the minimum stock, I want to show a label saying so.
    However, in the routine that determines the visibility, the two totals are still null, so they're always below the minimum stock, and the label is always shown.

    After a lot of debugging and testing, I seem to find out that the totals are only filled in AFTER the "on current" event of the main form...

    I will include an attachment. This is a db based on a Microsoft Template.

    On opening go to the Enter/View Products form. First open the form as is. Look at the mention of "Reorder !!!", in comparison to the totals in the boxes above... this is wrong!!!
    Now put a break in the VB code of the form, in the Sub Form_Current. If you now step through the code, the label is displayed correctly...

    Any ideas on how to solve this?

    SpSp
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2003
    Location
    Antwerp, Belgium
    Posts
    9

    Solved: Totals calculated too slowly for label on main form

    I have been shown how to do it:
    by inserting a me.recalc on the subform... it was as simple as that !!!

    Thank you anyway for looking at this problem!

    SpSp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •