return to previous form

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
 
F

Fredg

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.
 

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