Hide Database Window

J

Jen

I have a database where I have set-up user level security and created a
Switchboard that loads on open. I have unchecked the "Display Database
Window" in Tools...Startup. However, I have noticed at some users desks and
also after it has been opened by various users, that the database window is
in a different position at various times. The database window is not
minimized, just in various places on the screen, partialy visible behind the
start-up form. I've noticed that some of the users don't open the database
with the full screen and this seems to possibly be the cause???
I've taken away the min/max and re-size capability from the start-up form,
but when the database window is partially visible, the user can click on it
and bring it to the front of the window. I have marked each object as
"Hidden", but when I am working on the database and check "Show Hidden" in
the options there are occassions where I have forgot to uncheck this before
closing and then the users can see the objects the next time it is opened.
Is there something I am missing? Is there some way to set the database
window to always center so it is not all over the screen and accessible to
the users?
Thanks
 
J

Joan Wild

Unchecking 'display database window' in Startup should have been enough to hide it.

You need to find out how it is getting shown again. Could be...
1. Code in the switchboard form is causing the db window to be displayed. Look for the following in the code behind the switchboard form and comment these lines (put a ' at the beginning of each line)
DoCmd.SelectObject acForm, "Switchboard", True
DoCmd.Minimize

You might have similar code elsewhere that is doing this.

2. Users are going to the Window, Unhide menu and choosing to display the database window. You can create a custom menu for use in your application that doesn't have this menu item on it.

3. Users are holding down the shiftkey on startup and bypassing the startup settings. You can disable the shiftkey bypass; see
http://www.mvps.org/access/modules/mdl0011.htm
and
http://www.mvps.org/access/general/gen0040.htm
 
J

Jen

Hi Joan,
Thanks for you reply. I had already removed the code DoCmd.Minimize but had
left
DoCmd.SelectObject acForm, "Switchboard", True. Should I remove that also? I
had looked for similar code other places and couldn't find it. But the
database isn't minimized, it is just floating around. I had sized the
database window to a certain size to fit behind the switchboard form. When it
floats around, it stays the size I sized it, not minimized, it just doesn't
stay behind the switchboard form where I dragged it and closed the database
all the time (sometimes it does stay there???). Is there some place I can
place code so it will auto center at start-up, similar to what you can do
with reports and forms?
I had already created a custom menu at start-up that does not include
"Window". My users are pretty unsophisticated, Excel is almost beyond their
grasp. I doubt they know the "Shift" trick.
 
J

Joan Wild

Jen said:
Hi Joan,
Thanks for you reply. I had already removed the code DoCmd.Minimize but had
left
DoCmd.SelectObject acForm, "Switchboard", True. Should I remove that also?

Yes, you should - that is causing the db window to be displayed. If you set the switchboard to open on startup (in tools, startup), then you don't need this code.
 
J

Jen

Thanks. I will try that. I didn't think it would affect it since it was
referring to the Switchboard and not the Database Window.
Any guess why it would be floating around anyway? I am the only Admin and
the users don't have any re-size, min/max, etc. I would think as an Admin,
when I size it and drag it to the center, that it would have just kept
opening with it in the same location. Is this just some weird anomoly?
 
J

Joan Wild

DoCmd.SelectObject displays the db window in order to select the object.
Try commenting out that line, set the switchboard form as the one to open on startup in Tools, Startup and see if it fixes your problem.
 

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