G
Guest
Hello I have a login form that opens up my frm_Switchboard. The problem im
having is one the right password and userid gets entered I log in and the
form never closes. What and where do I enter the close command? Here is the
code behind my Login form. Thanks!!
Private Sub Command4_Click()
If IsNull(Me.quserid) Then
MsgBox "You must enter a User ID"
Exit Sub
Else
If IsNull(Me.qpwd) Then
MsgBox "You must enter a password"
Exit Sub
End If
End If
If Me.qpwd.Value = DLookup("PWD", "tbl_Password", "USERID = '" &
Me.quserid.Value & "'") Then
DoCmd.OpenForm "frm_Switchboard", acNormal
Else
MsgBox "Invalid User Name or Password"
End If
End Sub
having is one the right password and userid gets entered I log in and the
form never closes. What and where do I enter the close command? Here is the
code behind my Login form. Thanks!!
Private Sub Command4_Click()
If IsNull(Me.quserid) Then
MsgBox "You must enter a User ID"
Exit Sub
Else
If IsNull(Me.qpwd) Then
MsgBox "You must enter a password"
Exit Sub
End If
End If
If Me.qpwd.Value = DLookup("PWD", "tbl_Password", "USERID = '" &
Me.quserid.Value & "'") Then
DoCmd.OpenForm "frm_Switchboard", acNormal
Else
MsgBox "Invalid User Name or Password"
End If
End Sub