Form will not stay open

  • Thread starter Thread starter Rich
  • Start date Start date
R

Rich

Hi,

I currently working on a muti-tab form where one of the
pages has a command button that opens another form. This
continous form displays some queried data and a command
button that has a macro to close the form. However, this
macro closes both the muti-tab form and the continous
form. (only the countinous form should close). Both forms
are modal and pop-up enabled. I would be much obliged if
anyone had any ideas.
 
-----Original Message-----
Hi,

I currently working on a muti-tab form where one of the
pages has a command button that opens another form. This
continous form displays some queried data and a command
button that has a macro to close the form. However, this
macro closes both the muti-tab form and the continous
form. (only the countinous form should close). Both forms
are modal and pop-up enabled. I would be much obliged if
anyone had any ideas.
.

Use the DoCmd.Close(?) before you open your new form in
your code. Thats the solution Ive used on my forms. It
might work for you.
 
Hi,

I currently working on a muti-tab form where one of the
pages has a command button that opens another form. This
continous form displays some queried data and a command
button that has a macro to close the form. However, this
macro closes both the muti-tab form and the continous
form. (only the countinous form should close). Both forms
are modal and pop-up enabled. I would be much obliged if
anyone had any ideas.

I'm not a macro expert (I prefer VBA), but I know that the VBA Close
method allows you to specify the name of the form to close. Does the
Macro event give you the same option? If so, specify which form.
 
I'm not a macro expert (I prefer VBA), but I know that the VBA Close
method allows you to specify the name of the form to close. Does the
Macro event give you the same option? If so, specify
which form.

Yes, macros do give you the option of specifing which
form which is the wierd part as they both close although
only one is specified
 
which form.

Yes, macros do give you the option of specifing which
form which is the wierd part as they both close although
only one is specified

Odd! Could you post the actual steps of the macro?

Fwiw, the VBA code would be

Private Sub cmdClose_Click()
DoCmd.Close acForm, "NameOfTheFormToClose"
End Sub
 
Back
Top