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.
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"
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....
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.