SetProperties function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a database and I made a function called SetProperties (taken form
http://www.databasedev.co.uk/disable_shift_bypass.html) and it is for
protecting the database from bypress shift key. Now after doing the function
it does not work. And when I press the command it appears an error happens.
And gives me a message “expected variable or procedure, not moduleâ€.
Can any body help me?

thanks!
 
As a guess you named the module with the same name as the function. That is
wrong. Try renaming the module.

If that fails, show us the code behind the "command" - (a button you are
pressing?) .



--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Hi,
You are right, I renamed the module and the error disappears.
But now still does not work and the new error happens in the code below:
MsgBox "The Bypass Key has been enabled." & vbCrLf & vbLf & _
"The Shift key will allow the users to bypass the startup & _
options the next time the database is opened.", _
vbInformation, "Set Startup Properties"

It gives me a message “syntax error†and the code above is red
 
Hi,
You are right, I renamed the module and the error disappears.
But now still does not work and the new error happens in the code below:
MsgBox "The Bypass Key has been enabled." & vbCrLf & vbLf & _
"The Shift key will allow the users to bypass the startup & _
options the next time the database is opened.", _
vbInformation, "Set Startup Properties"

It gives me a message �syntax error� and the code above is red
 
That seems to be missing some quote marks. At the end of the second line
and at the beginning of the third line.

MsgBox "The Bypass Key has been enabled." & vbCrLf & vbLf & _
"The Shift key will allow the users to bypass the startup" &
_
" options the next time the database is opened.", _
vbInformation, "Set Startup Properties"

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top