vba - disable shift key on startup in ms-access -


problem: in ms access can hold shift key when opening database in order bypass startup options , autoexec script. want disable permanently.

first of know has been answered on numerous other sites, not find question here, have different need.the solutions found focused on placing invisible buttons re-enable shift-key shortcut passwords etc.

i want very simple solution. want script can add autoexec script disable shift-key shortcut or that.

i do not need way re-enable shift-key shortcut.

the simplest, secure, , easiest way preferred.

thanks!

i have used bit of code

function setbypass(rbflag boolean, file_name string) integer     docmd.hourglass true     on error goto setbypass_error     dim db database     set db = dbengine(0).opendatabase(file_name)     db.properties!allowbypasskey = rbflag setbypass_exit:     msgbox "changed bypass key " & rbflag & " database " & file_name, vbinformation, "skyline shared"     db.close     set db = nothing     docmd.hourglass false     exit function   setbypass_error:     docmd.hourglass false     if err = 3270         ' allowbypasskey property not exist         db.properties.append db.createproperty("allowbypasskey", dbboolean, rbflag)          resume next     else         ' other error message         msgbox "unexpected error: " & error$ & " (" & err & ")"         resume setbypass_exit     end if end function 

you pass filename , if want bypass key enabled or not.

the problem else code can use “unlock” database , enable bypass key.

the way can think around give users runtime version of access


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -