Wait till after calculations

G

Guest

Hello-
I have a form with some decently large formulas & subforms also with lots of
formulas. It takes a few second for everything to calculate out. I would
like to know how to make a "please wait" form wait till all the cells are
updated. I can't figure out which event triggers, once all the text boxes
have finished with their calcuation. I don't want to use a timer event due
to different computers will take different amounts of time to process. I
would like a event to trigger, so I can code from there. Any help would be
appreciated.
 
B

bhipwell via AccessMonster.com

Access isn't very good at doing calculations as a whole. Usually it is
better to link to an excel file. However, instead of having the formulas
within the form fields, place the formula codes on the onclick event of a
button. You may even consider coding a message before the onclick event
formulas that won't allow the calculation to perform until all fields are
completed such as:

If IsNull([FieldA]) Then
Msgbox "Please enter data into form A", vbOKOnly,"Information Needed"
Exit Sub
Else
End If

B
 
G

Guest

Well I actually figured it out yesterday. All you have to do is make a
please wait form. on the VB code for the original form put:

DoCmd.OpenForm ("WAIT CALC")
DoEvents
Me.Recalc
DoCmd.Close acForm, "WAIT CALC"

and make the "wait calc" form property modal to yes & popup to yes. The
form comes up, stays while the calcs are done. The second they finish it goes
away.
Thanks for the help though!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top