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
 
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
 
Back
Top