Code execution after Form opens

G

Guest

Hello,

I have some code that when gets to a certain point opens up a Form to prompt
the user on certain criteria & based on what the user clicks on I want to do
different things. Everything works fine except when I have

DoCmd.OpenForm "frmFormName"
..... more code

the Form opens but then the rest of the code after that command continues on
to execute which I dont want. I want it to stop when the Form Opens & then
when the Form closes to coninue on.

What am I doing wrong or not including ?

Any help would be greatly appreciated.

Thank you,
Jeff
 
B

Brian Bastl

Jeff,

Open the form modally with the following:

DoCmd.OpenForm "frmFormName" ,,,,,acDialog
........More code


HTH,
Brian
 
G

Guest

Hi Brian,

Perfect !

Thank you very much for your help, opening the Form that way would be
different then setting the Modal Property to Yes in the Form Properties.
 

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