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?<br>Code as follows:<br>sql= "insert into orderitems (<b>orderid</b>,productid, qty,priceperunit) values ('" & <b>orderid</b> & "','" & acart(i,0) & "','" & acart(i,1) & "','" & rsprice("saleprice" & "')"<br><br>Note: Bold is the primary key<br><br>Appreciate any thoughts!