Simple Code Issue

PaulA

Registered User.
Local time
Today, 17:51
Joined
Jul 17, 2001
Messages
416
Hi, all -

I'm getting "Compile error: Method or Data Member not found" when running a simple code.

Here's the code:

Private Sub btnOK_Click()

Dim rs As Recordset

Set rs = CurrentDb.OpenRecordset("tblEmployeeList", dbOpenSnapshot, dbReadOnly)
rs.FindFirst "UserName='" & Me.[txtUserName] & "'"

The error highlights "me.[txtUserName] although the "txtUserName" was an option when writing "me.".

Not sure where to go next.

thanks.
 

Users who are viewing this thread

Back
Top Bottom