RecordsetClone error

  • Thread starter Thread starter RD
  • Start date Start date
R

RD

The code below is giving me, "3070: The Microsoft Jet database engine does not
recognize 'testID' as a valid field name or expression."

Set rs = Me.RecordsetClone
rs.FindFirst "Wkr_ID = " & Me!Wkr_ID

I've done this before. I figure I must just be tired and I'm not seeing WTF I'm
doing wrong.

Time to shut down and head to my local Irish pub.

Thanks for any help,
RD
 
RD said:
The code below is giving me, "3070: The Microsoft Jet database engine
does not recognize 'testID' as a valid field name or expression."

Set rs = Me.RecordsetClone
rs.FindFirst "Wkr_ID = " & Me!Wkr_ID

I've done this before. I figure I must just be tired and I'm not
seeing WTF I'm doing wrong.

Time to shut down and head to my local Irish pub.

Just on the off chance you haven't headed out yet ...

If the error is really coming on that line, it implied that the value of
Me!Wkr_ID is the string "testID". If that's a valid value for the
Wkr_ID field, then that's a text field and the value you're searching
for must be enclosed in quotes. Try:

rs.FindFirst "Wkr_ID = '" & Me!Wkr_ID & "'"

That places single-quotes (') around the value being sought.
 
Just on the off chance you haven't headed out yet ...

If the error is really coming on that line, it implied that the value of
Me!Wkr_ID is the string "testID". If that's a valid value for the
Wkr_ID field, then that's a text field and the value you're searching
for must be enclosed in quotes. Try:

rs.FindFirst "Wkr_ID = '" & Me!Wkr_ID & "'"

That places single-quotes (') around the value being sought.

Ah! I guess I *was* tired. That did the trick. Frankly, I'd forgotten about
that particular form till this morning.

Thanks,
RD
 
Back
Top