Hi, folks.
I'm using the .FindFirst method to locate a record in a recordset (RstData below) created by the OpenRecordset method. The field I'm searching ([ID]) has been defined as a text field, and I'm searching for a string value assigned to a variable (WO_ID) declared as a string:
RstData.FindFirst "[ID] = " & WO_ID
I keep getting a "data type mismatch" error -- and I can't figure out why.
In the same database, I've also used exactly the same setup and syntax, but with a field ([RptNum]) defined as a number, and a variable (LastRptNum) declared as an integer:
RstData.FindFirst "[RptNum] = " & LastRptNum
This works just fine.
Any clues as to why the number-oriented version of this works, while the string-oriented version doesn't?
Thanks for any help you can provide. This has left me scratching my head....and cursing Microsoft.
Respectfully,
GWhiz
I'm using the .FindFirst method to locate a record in a recordset (RstData below) created by the OpenRecordset method. The field I'm searching ([ID]) has been defined as a text field, and I'm searching for a string value assigned to a variable (WO_ID) declared as a string:
RstData.FindFirst "[ID] = " & WO_ID
I keep getting a "data type mismatch" error -- and I can't figure out why.
In the same database, I've also used exactly the same setup and syntax, but with a field ([RptNum]) defined as a number, and a variable (LastRptNum) declared as an integer:
RstData.FindFirst "[RptNum] = " & LastRptNum
This works just fine.
Any clues as to why the number-oriented version of this works, while the string-oriented version doesn't?
Thanks for any help you can provide. This has left me scratching my head....and cursing Microsoft.
Respectfully,
GWhiz