Everytime I try to call, or add to a primary key with a database, I get this error " Data type mismatch in criteria expression.", I know it has to be possible to get or update the primary key autonumber, but why isn't this working?
Code as follows:
sql= "insert into orderitems (orderid,productid, qty,priceperunit) values ('" & orderid & "','" & acart(i,0) & "','" & acart(i,1) & "','" & rsprice("saleprice"
& "')"
Note: Bold is the primary key
Appreciate any thoughts!
Code as follows:
sql= "insert into orderitems (orderid,productid, qty,priceperunit) values ('" & orderid & "','" & acart(i,0) & "','" & acart(i,1) & "','" & rsprice("saleprice"
Note: Bold is the primary key
Appreciate any thoughts!