FoxProProgrammer
Programmer
I am attempting to use the FindFirst Method on a Recordset object that was created with a Query in the Recordsource property of a form. Table A has a one to many relation to Table B, and Table B has a one to many relation to Table C. The Query joins the three tables. Here's my code:
dim strPN as String
dim strManufName as String
dim strSearch as String
strPN = partNbr.Value
strManufName = ManufName.Value
strSearch = "[Manufacturer] = " & strManufName & " AND [Part Number] = " & strPN
RecordsetClone.FindFirst strSearch
When I run the program, I get the following error:
The Microsoft Jet database engine does not recognize 'XXXX' as a valid field name or expression.
I should note that 'XXXX' is the name of the manufacturer selected in the combo box named "ManufName".
Does anyone know why the data that I am looking for is being treated as a field name, or is it barfing on the expression? [Manufacturer] and [Part Number] are valid fields in the Query.
Thanks!
dz
dim strPN as String
dim strManufName as String
dim strSearch as String
strPN = partNbr.Value
strManufName = ManufName.Value
strSearch = "[Manufacturer] = " & strManufName & " AND [Part Number] = " & strPN
RecordsetClone.FindFirst strSearch
When I run the program, I get the following error:
The Microsoft Jet database engine does not recognize 'XXXX' as a valid field name or expression.
I should note that 'XXXX' is the name of the manufacturer selected in the combo box named "ManufName".
Does anyone know why the data that I am looking for is being treated as a field name, or is it barfing on the expression? [Manufacturer] and [Part Number] are valid fields in the Query.
Thanks!
dz