Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setproperties("AllowBypassKey") / Loop

Status
Not open for further replies.

Crookshanks

Technical User
May 18, 2004
296
NL
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,


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top