Wait for adding a record to a form

  • Thread starter Thread starter SAC
  • Start date Start date
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.
 
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
 
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.
 
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
 
Back
Top