Exit Switchboard to Database Window

G

Guest

Currently the switchboard opens upon opening the database, which I want to
keep, but I want to add a button to Exit Switchboard to Database Window to
allow access to the Tables, Queries, Reports, etc.

What is the correct code for the macro command? The macro needs to close
the switchboard or put it to the back and open up the Database Window.

Please help!
 
A

Allen Browne

Use the Close action to close the form

Use SelectObject to choose the database window.
Choose whatever tab you like.
Leave the object name out if you wish, but you must set the last argument of
SelectObject to Yes so that it selects the database window.

If you are closing a bound form, make sure you save any edits that are in
progress, or Access will silently discard them. More info in this bug:
Losing data when you close a form
at:
http://allenbrowne.com/bug-01.html
 
G

Guest

That worked Great!! Thank you for your help.

Allen Browne said:
Use the Close action to close the form

Use SelectObject to choose the database window.
Choose whatever tab you like.
Leave the object name out if you wish, but you must set the last argument of
SelectObject to Yes so that it selects the database window.

If you are closing a bound form, make sure you save any edits that are in
progress, or Access will silently discard them. More info in this bug:
Losing data when you close a form
at:
http://allenbrowne.com/bug-01.html
 

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