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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FindFirst LIKE

Status
Not open for further replies.

Vcscwi

Programmer
Jan 15, 2004
57
US
I'm in the middle of a data conversion and I'm having a problem. My FindFirst isn't finding the first record.

My code:
coPolicy.FindFirst "CompanyName Like ' " & Left(CLNTMSTR![Name], 13) & "*'"

My Data:
The CoPolicy table has multiple records with exactly the same Company name, but my find is starting on the second record for the company being searched. I have the table order set to CompanyName.

1 ABC company
2 ABC company
3 ABC company
4 BBB Inc
5 BBB Inc
6 BBB Inc
7 BBB Inc

So if I run the findfirst like for BBB Inc I get record 5 instead of 4.

Any ideas?
 
Spurious space in the Like expression:
coPolicy.FindFirst "CompanyName Like '" & Left(CLNTMSTR![Name], 13) & "*'"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top