Wait for adding a record to a form

S

SAC

ms access 2003

I'm want to add code to a not in list event for a control.

I want to open a form, add a record and then requery the control....the
problem is I don't know how to stop the code that runs after I open the form
to add a record.

Is it a doevents command? I tried that but was unsuccessful.

Thanks for your help.
 
T

Tom van Stiphout

You need to open that form modally, so the next line only executes
after you close the form:
DoCmd.OpenForm "myForm",,,,,acDialog

-Tom.
Microsoft Access MVP
 
C

cabos.antoine

SAC said:
ms access 2003

I'm want to add code to a not in list event for a control.

I want to open a form, add a record and then requery the control....the
problem is I don't know how to stop the code that runs after I open the
form to add a record.

Is it a doevents command? I tried that but was unsuccessful.

Thanks for your help.
 
S

SAC

Thanks!!!!


Tom van Stiphout said:
You need to open that form modally, so the next line only executes
after you close the form:
DoCmd.OpenForm "myForm",,,,,acDialog

-Tom.
Microsoft Access MVP
 

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