You are on page 1of 35

Option Compare Database

Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then
'MsgBox "LoginID or password correct"
DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub
Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub
Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If
End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job
If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value
& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()


End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub
Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If
End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()
If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"
End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job
If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value
& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()


End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then
'MsgBox "LoginID or password correct"
DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub
Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()
If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"

End If

End If
End Sub

Private Sub Form_Current()

End Sub
Option Compare Database
Private Sub Command1_Click()

If IsNull(Me.txtLoginID) Then
MsgBox "Please enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job

If (IsNull(DLookup("UserLogin", "tblUser", "UserLogin ='" & Me.txtLoginID.Value


& "'"))) Or _
(IsNull(DLookup("password", "tblUser", "Password ='" & Me.txtpassword.Value &
"'"))) Then
MsgBox "incorrect LoginID or password"
Else
UserLevel = DLookup("UserSecurity", "tblUser", "UserLogin = '" &
Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = 1 Then

'MsgBox "LoginID or password correct"


DoCmd.OpenForm "Main_form"
End If

End If
End Sub

Private Sub Form_Current()

End Sub

You might also like