I am still having trouble trying to figure this out. I have a tempVars that grabs the UserType ID. Then it moves to the next line of code. If that user ID is 1 then the ask the user if they want to allow the bypass key. If the user ID is NOT 1 then it shouldn't display or ask the user about the bypass key but it still is. I have removed
Code:
CurrentDb.Properties.Append
from the code. This is were I am at now.
Code:
TempVars("UserType") = rs!UserType_ID.Value
If rs!UserType_ID = 1 Then
Dim prop As Property
Set prop = CurrentDb.CreateProperty("AllowByPassKey", dbBoolean, False)
End If
On Error GoTo SetProperty
SetProperty:
If MsgBox("Would you like to turn on the bypass Key?", vbYesNo, "Allow Bypass") = vbYes Then
CurrentDb.Properties("AllowBypassKey") = True
Else
CurrentDb.Properties("AllowBypassKey") = False
End If
End Sub