return to previous form

  • Thread starter Thread starter Pia Jones
  • Start date Start date
P

Pia Jones

I have a Information form with a combo box; if a person isn't in the combo
list, it brings up a Add Person Form to fill out. After I have filled the
form and executed a DoCmd.Close on the Add Person Form, I need the code to
return you to the Information Form, at the combo box I was at when I left,
and hopefully do a Me.Refresh to update the combo box.

Pia
 
Pia,
If you open the second form as acDialog:
DoCmd.Openform "SecondFormName", , , , , acDialog
it will open on top of the original form.
Enter your new data.
When you click the close (X) button, it will close
and the original form will regain focus.

No special Close coding is needed in that second form

Use Me!ComboName.Requery
in the original form event that opens the second form.
 
Back
Top