Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing forms with return to menu button

Status
Not open for further replies.

bbannock

Technical User
Oct 24, 2003
30
US
hi, I'm creating a database which contains alot of links to other forms...each form has a return to menu link at the bottom right which takes the user to the previous menu. The only problem is that when I click that button, the previous form stays open in the background while the new form is opened...After using the database for a while there are a bunch of windows open and it can become confusing. Is there a macro or anything else I can do to auromatically close one form when I use a link to open another.

for example...
Form A has Link the Form B
When I hit the link Form B opens and Form A stays open

I want form A to close once link to B is selected.

I know this is a little much, but I wanted to be as clear as possible. Thanks alot for all your help in advance.

Brandon
 
hi bbannock,
in the onclick event of the button which is opening Form B, place the following code.

docmd.close acForm, me.name,acsaveyes

that will close the form which is opening the new form.

let me know if this works for you,
James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top