closing forms

  • Thread starter Thread starter MC
  • Start date Start date
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
 
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
 
Back
Top