F11 Key

J

Joe Cilinceon

I was wondering if it is possible to have the main database window open from
a button on a form instead of using F11 to do it. This is after you have
unchecked the Display Database Window to off in the Startup settings. If so
what would you have to add to the On Exit control button in the way of code.
 
A

Allen Browne

Use the SelectObject action, with the final argument set to True, e.g.:
DoCmd.SelectObject acForm,,True
 
J

Joe Cilinceon

Thanks Allen but the SelectObject would be what? I'm talking about openning
the main window that shows all the tables, query etc. I have it shut off at
start and when I close my form I want it to then appear.
 
A

Allen Browne

There is no built-in command specifically for showing the database window.

The SelectObject command lets you select an object, and the last argument is
InDatabaseWindow. If you use True for that argument, you are selecting the
object in the database window. In order to do that, Access has to show the
database window.

So, SelectObject is the way to show the database window.

Let us know if it does not work for you.
 
J

Joe Cilinceon

Nope it didn't work, at least just Select Object didn't. I was thinking that
you needed to know the object name to use this. Thanks for the attempt
anyhow it is appreciated.
 
A

Allen Browne

Okay, Joe

I'm thinking that you did not set the InDatabaseWindow argument to True.
 
J

Joe Cilinceon

Ok I have it now. I didn't have it as the last statement but had it just
before the close form statement. That now works perfectly.
 

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