G
Guest
I have just created a record in tblA
I need to create a linking record in tblB with the primary key from tblA, say "aID", in tblB's foreign key fiel
I've used DMAX to get the newly created "aID" and store it in lngaID, an integer variable
I've created an Append query and set the foreign key "aID" to "lngaID
In the query, the variable name is in quotes
I get "Data type mismatch in criteria expression
1) What's the problem and the fix? I thought long integer was equivalent to an auto-number ID field's data type
2) Is there a better way, can I set the foreign key in tblB to the latest-n-greatest primary key in tblA "on the fly" with an expression in the query and not have to mess with visual basic variables
I need to create a linking record in tblB with the primary key from tblA, say "aID", in tblB's foreign key fiel
I've used DMAX to get the newly created "aID" and store it in lngaID, an integer variable
I've created an Append query and set the foreign key "aID" to "lngaID
In the query, the variable name is in quotes
I get "Data type mismatch in criteria expression
1) What's the problem and the fix? I thought long integer was equivalent to an auto-number ID field's data type
2) Is there a better way, can I set the foreign key in tblB to the latest-n-greatest primary key in tblA "on the fly" with an expression in the query and not have to mess with visual basic variables