-3
タイプミスマッチエラーが発生しているので、間違っていることがわかりません。タイプミスマッチエラー何をすべきかわからない
これは私がこれまでにしようとしているものです:
Private Sub Command1_Click()
Dim UserLevel As Integer
If IsNull(Me.txtLoginID) Then
MsgBox "Please Enter Login ID", vbInformation, "Login ID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtPassword) Then
MsgBox "Please Enter Password", vbInformation, "Password Required"
Me.txtPassword.SetFocus
Else
If (IsNull(DLookup("UserLogin", "Accounts", "UserLogin='" & Me.txtLoginID.Value & "'"))) Or _
(IsNull(DLookup("Password", "Accounts", "Password='" & Me.txtPassword.Value & "'"))) Then
MsgBox "Incorrect Login ID or Password"
Else
UserLevel = DLookup("UserSecurity", "Accounts", "UserLogin= '" & Me.txtLoginID.Value & "'")
DoCmd.Close
If UserLevel = admin Then
DoCmd.OpenForm "Administrator"
Else
DoCmd.OpenForm "Sales"
End If
End If
End If
どの行でエラーがスローされますか? – Andre