closing forms

M

MC

I have made a tab folder with several forms. When I click
on a new form, the old one stays open. Sometimes, I have 8-
10 forms open. What do I do to make a form close, when I
click a button to open up another form?

I have been looking at the help, and I think it is the
OnFocus command. I can't seem to get it right. Any easy
way of doing it?

Thanks

MC
 
A

Art

Hi MC,
In the ON OPEN event of the form you are opening, you
could open a code window and type:
DoCmd.Close acForm "YourPreviousFormName"
acNoSave.

Check Help on DoCmd for the exact syntax. This may not
work if you open different forms at different times so
that you don't know what the name of the previous form is
going to be.

The Easy Day
 

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