Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Indiana, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hiding/Unhiding the Database Window (Access 97 SR2)

    At the startup of our database, I have unchecked the Display Database Window option in the Startup dialog box. I also want to prevent users from using the shift key to open the database window when opening the database. But, I want to be able to open the database window. What I would like to do is when I log in to the database there is code that automatically opens the database window. I have read Access Help on the subject but I don't really understand it. Is there a simple way to do this? If I haven't explained my needs clearly, let me know.

    Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hiding/Unhiding the Database Window (Access 97 SR2)

    The simplest way to handle it is to put a transparent button on your switchboard or whatever startup form you use and put the code to unhide the database window in the button's onclick event. You can simply put a line like this in that event procedure:

    DoCmd.SelectObject acForm, Me.Name, True

    Which tells it to select the current form object in the database window.
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Indiana, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hiding/Unhiding the Database Window (Access 97 SR2)

    Thanks, Charlotte. Your recommendation gets me part of the way there. I placed a transparent button on the opening form and placed the code in the event procedure. I opened the database and clicked on the button. It did open the database window and highlighted the opening form, but since the opening form stayed open, the database window was frozen until I closed the opening form. So, I guess I will add a close form command on the button. That should take care of that part.

    The other thing I really need to do is to completely disable the shift key so that it can't be used to open the database window. Can that be done? Or, should that be done? I just don't want anyone to be able to open the database window, period.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hiding/Unhiding the Database Window (Access 97 SR2)

    <hr>. It did open the database window and highlighted the opening form, but since the opening form stayed open, the database window was frozen until I closed the opening form<hr>
    This sounds a bit like a Burns and Allen routine (say goodnight, Gracie). Normally, you do this with the current form only when you are closing that form. Otherwise, pick another form or a table that will always be there and use that. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15> I don't allow the database window to be opened except from my backdoor button on the switchboard, and the same routine closes the switchboard.

    Yes, it can be done. I'll leave the should part up to you. If you do a search on database window in this forum, you'll find previous discussions on this subject.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •