How do I start one form based on the close of another form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am just starting in Access so sorry about the simply question I have. I
have a form that I want to have triggered based on the closure of another
form. I know it should be in the properties sheet of the driving form in the
"on close event" I just don't know how to code the start of another form.

Thanks,
 
stickandrock said:
I am just starting in Access so sorry about the simply question I have. I
have a form that I want to have triggered based on the closure of another
form. I know it should be in the properties sheet of the driving form in
the
"on close event" I just don't know how to code the start of another form.

Thanks,

DoCmd.OpenForm "Employees", acNormal

Replace the word Employees with the name of the form you want to open.
Don't forget the period after the word DoCmd.

Tom Lake
 
Thanks... Perfect... I just wasn't clear on the format of the command...
 
Hi,
Yes, it should be in the Close event of the first form.
You will have to select [event procedure] on the properties sheet and click
on the elipsis (...) this will bring up the code window and your cursor should be in the
Close event.
This is the code:

DoCmd.OpenForm "NameOfYourForm"

There are many other arguments to the OpenForm method but they're optional.
Take a look at the topic in help if you want more info on them
 
hi,
It doesn't necessarily be on the On close event
I have a main form that open other forms. closing the
other forms opens the main form back up. i use the buttom
click even to do both.
example below.

Private Sub cmdExitspecial_Click()

DoCmd.OpenForm "frmmainIntro", acNormal
DoCmd.Close acForm, "frmSpecial", acSaveYes

End Sub

Regards
Frank
 

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

Back
Top