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

How do I bypass AllowBypassKey? 1

Status
Not open for further replies.

vanleurth

Programmer
Sep 1, 2001
156
0
0
US
Alright,

I have an AutoExec macro that runs a function that disable the AllowBypassKey but it doesn't work.

Am I placing the function in the right place.

V.
 
vanleurth,
Do you mean the function is not changing the property or the BypassKey feature (holding the Shift Key down while opening the database) is not bypassing the autoexec macro?

Obviously if you've disabled it (the AllowBypassKey property) then the Shift Key won't work anymore until you've enabled it again.

There's some good examples in the Access help files on this property. Have you had a look?

Also, be very careful with disabling this property. Make sure there is a way to enable it again from within the database.
Cheers.
 
Thanks for the fast response Edski,

I read about the property in the help file but I still can't get it to work. I have an AutoExec macro that launches a function called StartUp that disable the AllowBypassKey. One thing I have notice is that my database is not secure. Do you think this might be it ? Here is my StartUp function ...

Function StartUp()

' View Properties. Just for debugging purposes
'ViewProperties

' Disable AllowBypassKey so user can't bypass ACCESS and get full menus
SetProperty "AllowBypassKey", False

' Call splash screen
DoCmd.OpenForm "frm system splashscreen"

End Function

Thanks in advance,

V.
 
vanleurth,
you'll have to post your SetProperty function as well if you want someone to help out.
 
I put it in a separate, password-protected .mdb altogether that the users aren't even aware of, called AllowDisallowShiftKey.mdb, since I, as the programmer, would be the only person who would need to disable the shift key in the main application (for quick code changes/fixes).

This .mdb has a log-in screen, and one screen with two buttons: Enable Shift and Disable Shift. Works like a charm. Let me know if you'd like a copy.
 
I've got the same kind of thing, but I put it all in the main user database with a hidden button on the login screen that opens up an admin form, which, after entering the correct admin password, lets me enable/disable the shift key. No problems.
 
I'm also interested in having a separate application to enable/disable the bypass key in another database. I would appreciate getting a copy of sumoalex's .mdb to do this.
Thanks.
 
Public Sub Bypass()
Application.CurrentProject.Properties.Add "AllowByPassKey", False
End Sub

Note: Make a copy of your ADP first. If you've disallowed the F11 key (which is always a good idea) and run this, you'll never get into the back end of your DB again....

 
Thanks for the link to Jamie's Software - Access Proprty Editor. I downloaded it and it does exactly what I wanted!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top