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

How to hide my database window in MDE file? 2

Status
Not open for further replies.

khwaja

Technical User
Aug 27, 2001
431
AU
I have created an MDE file with a window hide code embedded in its switch board form so that people are not able to see anything behind. But I have noticed that my database window is still visible if someone fiddles with the switchboard. This was not the case when i was using Access 97. Is there any way I can make my DB inaccssible or for that matter, any tips on deploying the application?

Cheers

AK

Note: Using Access 97 - still.
 
You didn't mention which version of Access you're currently using.

I assume that you have set the start options for your MDB so that the database window on start is invisible. When this is so then consider the following:

Design your start form so that when it loads it is automatically set to maximum size (in the "on load" property of the form set the event to: "DoCmd.Maximize"). Set the Bound property of the form to true (yes).

Your start form must remain open in the background. You can either build your other forms into the start form as sub forms or, when this is too difficult, design your other forms as pop ups.

This should prevent users from "fiddling" with you database.

hth
 
You could disable your function keys so your users cannot view the database window. To do this, put the follwing code behind your forms:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

Select Case KeyCode
Case vbKeyF1, vbKeyF2, vbKeyF3, vbKeyF4, vbKeyF5, vbKeyF6, vbKeyF7, vbKeyF8, vbKeyF9, vbKeyF10, vbKeyF11, vbKeyF12, 18
KeyCode = 0
Beep
MsgBox "This key is disabled.", 48, "System Message"
End Select

End Sub

Also, in the Start-Up properties box, uncheck "Display database window" and "Display status bar".

With all this done, your form will open with no database window in the background and they won't be able to switch over to it with the function keys, either. FYI: Alt + F1 allows a user to switch from your form to the database window. But with the function keys disabled, they won't be able to do this. Another FYI: '18' in the code above is the code for the Alt key.

Hope this helps.
 
Added note to previous response: if you use the code in your key_down event, you must set the "Key Preview" property to "Yes" in the form's property box. If you don't do this, this code won't work. Good luck.
 
Thanks a lot for your help. It works well now. I had special keys checked in the start up which I turned off. I have not incorporated the code to suppresss function keys as I am not too sure where to place this. I have a traditional switch board which I modified for my application. Should this code be in the switchboard's on open event. Is it possible I can still gain access to function keys? Would this suppress the shift key operation too?

Cheers

AK

Note: Using Access 97 for back end A2002 for front end.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top