Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VBA Wait until form open

I have the following VBA in an Access project:

DoCmd.OpenForm "Importing"
' Some CPU-intensive code

The problem is, I just get a white screen until the intensive part is done.

How can I wait until the form is open before executing the rest of the code?

like image 856
Danny Beckett Avatar asked Jan 25 '26 12:01

Danny Beckett


1 Answers

Sorry for the question guys, I've just found the answer (one of them cases of Googling for a while, posting to SO, and finding the answer right after):

DoCmd.OpenForm "Importing"
DoEvents
' Some CPU-intensive code
like image 103
Danny Beckett Avatar answered Jan 28 '26 04:01

Danny Beckett



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!