A family of Microsoft relational database management systems designed for ease of use.
Hi Tom,
Is this correct?
======================
Option Explicit
Public g_strUserName As String
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
'If (IsNull(DLookup("[UserLogin]", "tblUser", "[UserLogin] = "" & me.txtLoginID.Value & "" And password = "" & me.txtPassword.Value & """))) Then
'If (IsNull(DLookup("[UserLogin]", "tblUser", "[Userlogin] = "" & Me.txtLoginID.Value & "" And password = "" & Me.txtPassword.Value & """))) Then
'If (IsNull(DLookup("Userlogin", "tblUser", "UserLogin='" & Me.txtusername.Value & "' And password='" & Me.txtPassword.Text & "'"))) Then
' MsgBox "Incorrect LoginID or Password"
If (IsNull(DLookup("userlogin", "tbluser", "userlogin = '" & Me.txtLoginID.Value & " '"))) Or _
(IsNull(DLookup("password", "tbluser", "password = '" & Me.txtPassword.Value & " '"))) Then
MsgBox "incorect loginid or password"
Else
DoCmd.close
DoCmd.OpenForm "switchboard"
End If
End If
End Sub
Private Sub Detail_Click()
g_strUserName = Me.txtLoginID
End Sub
Private Sub Form_Click()
g_strUserName = Me.txtLoginID
End Sub