Like setcriteria()

teiben

Registered User.
Local time
Today, 15:18
Joined
Jun 20, 2002
Messages
462
The user enters their password on a form frmCriteria, in an unbound field txtCriteria, on click:
Everything works fine, exept now I want to add a textbox, with strUsrLogin, how would I do this? I played around with the Dlookup, with no success. I tried copying Like setcriteria(), in the query, as a criteria for the strUsrLogin, no luck either.

Private Sub cmdOK_Click()
On Error GoTo Err_cmdOK_Click

gCriteria = Me!txtCriteria

' hide criteria form
DoCmd.RunMacro "mcrHideCriteria"

' close criteria form
DoCmd.close A_FORM, "frmCriteria"

' check to see if there are any records for this query
If DCount("[strUsrPsswd]", "qselDemo") < 1 Then
MsgBox "Sorry that password doesn't match.", 64, "Error"
Exit Sub
Else
DoCmd.OpenForm "frmDataEntry"
End If

Exit_cmdOK_Click:
Exit Sub

Err_cmdOK_Click:
MsgBox Error$
Resume Exit_cmdOK_Click

End Sub

The query is: qSelDemo,
One of the fields strUsrPsswd uses Like setcriteria() as criteria.

Any idea's for checking BOTH?
 
email me if you want a demo of what I think you are trying to do.
 
Email

DES,

Please email me the demo, I'm using 97
 

Users who are viewing this thread

Back
Top Bottom