Opening Multiple Forms and Wait for Data

ErikRP

Registered User.
Local time
Today, 14:23
Joined
Nov 16, 2001
Messages
72
I have several forms which use some fairly complex formulae to produce some results numbers. These forms feed one further form which uses the numbers generated in the first form. The user runs a macro which opens the first forms and then the last form. The problem is that the first forms are still getting their results together while the last form is trying to work with those numbers. In short, I'm getting a lot of #ERROR messages in the fields.

Is there way to slow things down so that the forms open, get all of their numbers, and then open the next form? Or even have a built in wait? Obviously I don't want a complete system wait or Access will just wait to calculate the numbers. I want Access to wait to open the next form.

I've tried working with Refresh, but it's not working well. I refresh each of the supporting forms as well as the final form, and the errors stay.

I know that there are likely more simple ways to do what I want, but this is what I'm stuck with.

Thanks!
 
It seems to me that if you can refresh the final form and maintain the errors, it could be that the errors are not caused by a problem in timing.

Matt
 
I should have been more clear on the process. To make matters more complicated, each of the first set of forms depends on some values from the other forms. To clarify:

FORM A - looks at FORM B for values
FORM B - looks at FORM A for values
FORM C - independent for values
FORM D - looks at FORM A & B for values
FORM E - looks at FORM A, B, C, D for values

I'm starting to think that the easiest thing is to just create a super FORM and have all of the smaller forms read from that...

To answer your question though, Matthew, it's definitely a refresh issue, or put another way, refresh (or opening the form in design, then back to form view) will take care of the problem. Depending on the speed of the computer it does work.
 
Thanks Pat, I think that's probably the way to go. My problem (and it's only one of many!) is that I have multiple forms and they are not always opened the same way. FORM A and FORM B need to be open for FORM C but I may just want to have FORM A open. I therefore can't have code in FORM A that says to wait and then open FORM C.

Is it possible to have code on FORM C (the one which needs the info from the other forms) that says to wait a few seconds before trying to calculate the form? Perhaps OnOpen?
 

Users who are viewing this thread

Back
Top Bottom