OpenForms and proceed the code (VBA)

mfaqueiroz

Registered User.
Local time
Today, 09:22
Joined
Sep 30, 2015
Messages
125
Hello,

To run the code the user click in the button "run" in one form. However, while the code is running i want that the user have the perception that access is working to achieve the results.
So, I tried to do two forms, one with a clock image and the text " Please wait..." and other with a smile saying " it is complete!".

And I've associated to the button the follow code


PHP:
Private Sub Run_Click()
DoCmd.OpenForm "Wait", acNormal, , , , acDialog
Call RunMyAlgorithm
DoCmd.OpenForm "Complete", acNormal, , , , acDialog
End Sub


However it stuck at the first row, open the form "Wait" that untill i close this form didn't proceed to the follow code.

How can i do that?

Thanks in advance for you help and knowledge
 
acDialog stops execution until the form closes, full stop. You'll need to open it acNormal and set the Popup and Modal properties to True in the form itself.

And out of curiosity, why the clock rather than a progress bar?
 
If you open a form as a dialog the execution of the calling forms code stops until that form is closed.
 

Users who are viewing this thread

Back
Top Bottom