• Hiding/Unhiding the Database Window (Access 97 SR2)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Hiding/Unhiding the Database Window (Access 97 SR2)

    Author
    Topic
    #361058

    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.

    Viewing 0 reply threads
    Author
    Replies
    • #544992

      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.

      • #545010

        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.

        • #545083

          [indent]


          . 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


          [/indent]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. shrug 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.

    Viewing 0 reply threads
    Reply To: Hiding/Unhiding the Database Window (Access 97 SR2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: