neveryona
03-22-2002, 02:20 PM
Just so proud of myself, had to show you. It works! http://www.PCGuide.com/ubb/biggrin.gif
Private Sub cmdok_Click()
Dim intResponse As Integer, intAttempt As Integer, strPass As String, intExit
Const conbtns As Integer = vbRetryCancel + vbApplicationModal + vbExclamation + vbDefaultButton1
Const conMsg As Integer = vbCritical + vbApplicationModal
Static intNum As Integer
strPass = "reuben"
If intNum <= 2 Then
intNum = intNum + 1 'as counter
If txtpass.Text = strPass Then
frmTables.Show
Unload frmPass
Else
intResponse = MsgBox("That is not the correct password.", conbtns, "Access Denied")
txtpass.SetFocus
End If
If intNum > 2 Then
intExit = MsgBox("Access Denied.", conMsg)
Unload Me
End If
End If
End Sub
Private Sub cmdok_Click()
Dim intResponse As Integer, intAttempt As Integer, strPass As String, intExit
Const conbtns As Integer = vbRetryCancel + vbApplicationModal + vbExclamation + vbDefaultButton1
Const conMsg As Integer = vbCritical + vbApplicationModal
Static intNum As Integer
strPass = "reuben"
If intNum <= 2 Then
intNum = intNum + 1 'as counter
If txtpass.Text = strPass Then
frmTables.Show
Unload frmPass
Else
intResponse = MsgBox("That is not the correct password.", conbtns, "Access Denied")
txtpass.SetFocus
End If
If intNum > 2 Then
intExit = MsgBox("Access Denied.", conMsg)
Unload Me
End If
End If
End Sub