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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Unhide database window using code 2

Status
Not open for further replies.

mikemck7

Technical User
Dec 17, 2003
38
Hello,

I've unchecked Tools > Startup > Display Database Window to hide the database window when my form is opened. Now I would like to unhide the database window immediately as the form is closed or just prior. I use [tt]DoCmd.Close[/tt] in a command button to close the form. What code can I preceed this with to unhide the database window just prior to closing the form.
Thanks,

Mike
 
SendKeys "{F11}"

VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
You can also select a known object in the database window to make it unhide itself:

[tt]DoCmd.SelectObject acTable, "MyTable", True[/tt]

The last argument forces it to show in the database window.

VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
Just to be thorough, you can use an empty string as the object name and the window will open to the type of object specified without having to know the actual name of an existing object:

[tt]DoCmd.SelectObject acForm, "", True[/tt]

VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top