Pbaldy my login form is unbound and the UserID has a query as rowsource but there is no option to create a rowsource for the chkRemember checkbox. Also, since the form is unbound, the table fields are not listed in the control source drop-down-arrow. Could you advise please?
My thots were to bind it to the table field [PWRemember] and then have something like:
Private Sub Command1_Click()
If Me.cmbUser.Value = DLookup("UserID", "tblUser", "[strPassword]=" &
Me.txtPassword.Value) Then
If Me.chkRemember.Value = True Then
DoCmd.OpenForm "ObstetricsForm"
End If
Else
MsgBox "You need to select a user!", vbCritical + vbExclamation,
"Required data"
End If
If IsNull(Me.txtPassword) Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Else
Me.txtPassword.Value = DLookup("strPassword", "tblUser", "[UserID]
=" & Me.cmbUser.Value)
DoCmd.OpenForm "ObstetricsForm"
End If
End Sub