Code:
Private Sub btnClose_Click() DoCmd.Quit
End Sub
'Private Sub btnLogin_Click()
' Dim rs As Recordset
'
' Set rs = CurrentDb.OpenRecordset("tbl1Employees", dbOpenSnapshot, dbReadOnly)
'
' rs.FindFirst "UserName='" & Me.txtUserName & "'"
'
' If rs.NoMatch Then
' Me.lblWrongUser.Visible = True
' Me.txtUserName.SetFocus
' Exit Sub
' End If
' Me.lblWrongUser.Visible = False
'
' If rs!Password <> Encrypt(Me.txtPassword) Then
' Me.lblWrongPass.Visible = True
' Me.txtPassword.SetFocus
' Exit Sub
' End If
' Me.lblWrongPass.Visible = False
'
' TempVars("UserName").value = Me.txtUserName.value
'
' If rs!EmployeeType_ID = 3 Then
' Dim prop As Property
' On Error GoTo SetProperty
' Set prop = CurrentDb.CreateProperty("AllowBypassKey", dbBoolean, False)
'
' CurrentDb.Properties.Append prop
'
'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 If
'
' Me.Visible = False
' Globals.Logging "Logon"
'
' DoCmd.OpenForm "frmMainMenu"
'' DoCmd.Close acForm, Me.Name
End Sub
Private Sub Form_Unload(Cancel As Integer)
Globals.Logging "Logoff"
End Sub