Form will not stay open

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.
 
E

Edm

-----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.
 
J

John Vinson

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.
 
R

Rich

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
 
J

John Vinson

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
 

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