Crookshanks
Technical User
Good afternoon,
I have a small module in which is determinded whether the bypasskey is enabled or not. I found some code on the internet but after some modifications iet seems looping when I want to Quit the application. This is the code:
Option Compare Database
Option Explicit
Const SecurityPass As String = "godmode"
Public Sub Security_Initialise() 'Initialises the Security_Menu
Form_Menu.Visible = False
With Form_Security
.Visible = True
.txtCode = ""
End With
End Sub
Public Sub security_ProcessInput()
If Form_Security.txtCode = SecurityPass Then
db.Properties("AllowByPassKey") = True
mes ("OK")
Else
db.Properties("AllowByPassKey") = False <------
mes ("Niet ok")
End If
Form_Security.Visible = False
Application.Quit
End Sub
On Form_Security you can type a password in the txtCode. If it is equal to SecurityPass then the AllowByPassKey is enabled. After that I want to close the application immediatly. But after the Application Quit command the code gets stuck at the arrow (<---).
I am not sure why the scripts tries to excute that line in the first place. There seems to be some kind of loop. Anybody got an idea what is going on?
Any help appreciated,
I have a small module in which is determinded whether the bypasskey is enabled or not. I found some code on the internet but after some modifications iet seems looping when I want to Quit the application. This is the code:
Option Compare Database
Option Explicit
Const SecurityPass As String = "godmode"
Public Sub Security_Initialise() 'Initialises the Security_Menu
Form_Menu.Visible = False
With Form_Security
.Visible = True
.txtCode = ""
End With
End Sub
Public Sub security_ProcessInput()
If Form_Security.txtCode = SecurityPass Then
db.Properties("AllowByPassKey") = True
mes ("OK")
Else
db.Properties("AllowByPassKey") = False <------
mes ("Niet ok")
End If
Form_Security.Visible = False
Application.Quit
End Sub
On Form_Security you can type a password in the txtCode. If it is equal to SecurityPass then the AllowByPassKey is enabled. After that I want to close the application immediatly. But after the Application Quit command the code gets stuck at the arrow (<---).
I am not sure why the scripts tries to excute that line in the first place. There seems to be some kind of loop. Anybody got an idea what is going on?
Any help appreciated,