Zxurian
Jul 19th, 2000, 03:44 PM
I posted awhile back about this problem, and now I'm giving an update since I still can't seem to solve the probelm.
I'm creating a database to handle orders, NOT a pos system. The database that I'm using has tables defined with the primary keys as "Customer ID", "Buisness ID", "Order ID", etc.., all defined as long integers.
When I try to compare an integer to the values in these fields, it keeps coming back with an incorrect data type error.
The comparision code that I'm using is as follows:
with datBuisness.recordset
frmCustomers.datCustomers.Recordset.FindFirst ("'Customer ID' = " & .Fields("Customer ID").Value)
frmOrders.cmdRelatedName.Caption = _
frmCustomers.datCustomers.Recordset.Fields("First Name").Value & " " & _
frmCustomers.datCustomers.Recordset.Fields("Last Name").Value
When it gets to the findfirst command, it gives the error message: Run-time error '3464': Data type mismatch in criteria expression.
Any ideas on how to fix this?
P.S. it looks like its a repetitive expression, but in the datCustomers, "Customer ID" is the primary key, for datBuisness, "Customer ID" is just another integer field.
I'm creating a database to handle orders, NOT a pos system. The database that I'm using has tables defined with the primary keys as "Customer ID", "Buisness ID", "Order ID", etc.., all defined as long integers.
When I try to compare an integer to the values in these fields, it keeps coming back with an incorrect data type error.
The comparision code that I'm using is as follows:
with datBuisness.recordset
frmCustomers.datCustomers.Recordset.FindFirst ("'Customer ID' = " & .Fields("Customer ID").Value)
frmOrders.cmdRelatedName.Caption = _
frmCustomers.datCustomers.Recordset.Fields("First Name").Value & " " & _
frmCustomers.datCustomers.Recordset.Fields("Last Name").Value
When it gets to the findfirst command, it gives the error message: Run-time error '3464': Data type mismatch in criteria expression.
Any ideas on how to fix this?
P.S. it looks like its a repetitive expression, but in the datCustomers, "Customer ID" is the primary key, for datBuisness, "Customer ID" is just another integer field.