Can Not Open DataBase. . .

Evagrius

Registered User.
Local time
Today, 13:26
Joined
Jul 10, 2010
Messages
170
Hi All,

I used a code to prevent the user from pressing the shift key to access the menus on the Database. I placed a textbox in a form that allows me to enter a password that would then enable the shift bypass key.

Due to some error I don't understand, the form opens up blank with no visible textboxes. I know there is a way around this by opening an alternate database. Can anyone please advice??
 
You can use this from another db file
Code:
Function EnableBypassKey()
    Dim db As DAO.Database
    Dim prp As DAO.Property
 
    Set db = OpenDatabase("[B][COLOR=red]FilePathAndNameHere[/COLOR][/B]")
 
    db.Properties.Delete "AllowBypassKey"
 
    Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, True, True)
 
    db.Properties.Append prp
    db.Properties.Refresh
 
    Set prp = Nothing
    Set db = Nothing
End Function
 
Bob - thank you so much . . .I don't have access to my PC now but I will try in the morning and let you know. You are the man brother :)
 
Actually, this might be just as good and shorter (make sure to test on a copy first):

Code:
Function EnableBypassKey()
    Dim db As DAO.Database
    Dim prp As DAO.Property
 
    Set db = OpenDatabase("FilePathAndNameHere")
 
    db.Properties("AllowBypassKey") = True
 

    Set prp = Nothing
    Set db = Nothing
End Function
 

Users who are viewing this thread

Back
Top Bottom