Hide Database Window All the Time (VBA and Set Up Config groups)

K

Katrina

I have my database set up with a startup form that I want
users to use for navigating through the database.

I have it set up so that the form shows up in the
begining and that the database window is hidden upon
startup.

My problem comes in when users make a new query. I have
the database set up to open the query wizard on a button
click with the command
DoCmd.RunCommand acCmdNewObjectQuery

When the new query is created, the database window
becomes visible. Is there a way around this?
(Maybe a visible property of the DB Window)
Katrina
 
C

Colin

Hi Katrina,

Here is some code that you may want to try


To show the database window, run
Docmd.SelectObject acTable, , True

To Hide the database window, run
Docmd.SelectObject acTable, , True
Docmd.RunCommand acCmdWindowHide
 
K

Katrina

Thanks, that worked great.
-----Original Message-----
Hi Katrina,

Here is some code that you may want to try


To show the database window, run
Docmd.SelectObject acTable, , True

To Hide the database window, run
Docmd.SelectObject acTable, , True
Docmd.RunCommand acCmdWindowHide


.
 

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