Close/Open form button

G

Guest

I am having trouble linking a button to close the current form and saving all
data, then opening another form (i.e., main menu form). How do i do this?
 
R

Rick Brandt

davidpkohne said:
I am having trouble linking a button to close the current form and
saving all data, then opening another form (i.e., main menu form).
How do i do this?


Me.Dirty = False
DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "main menu form"
 
G

Guest

The following will close a form when placed in OnClick event of your button.
Docmd.close acForm,"NameOfYourForm"

This will open a form:
docmd.openform "NameOfYourForm"
 

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