Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Numeric Findfirst 1

Status
Not open for further replies.

Domino2

Technical User
Jun 8, 2008
475
GB
I and trying to locate a record by its Primary key against a value in a numeric string PK4

strCriteria = "[ID2] =" & PK4
rs2.FindFirst (strCriteria)

Can someone correct this, many thanks
 
numeric string PK4

If ID2 is a numeric field and PK4 is a string variable then you need something like
strCriteria = "[ID2] =" & Clng(PK4)

If ID2 is a string field and PK4 is string or numeric
strCriteria = "[ID2] ='" & PK4 & "'
 
Many thanks MajP, I will pin that up on my wall.
Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top