need to update fields in a query.

D

Desert Bear

I am running two consecutive update queries
The first one adds a record to tblVersion
The second one needs to have the ID from that new tblVersion record
How do I get that data into the new records in the 2nd query?
 
M

Michel Walsh

Hi,


If you use ADO, to append your data, you can relay on:


CurrentProject.Connection.Execute("SELECT
@@Identity").Fields(0).Value



Else, you may hope that, in a single user environment,
DMax("AutonumberField", "tableName") could retrieve the value.
Alternatively, check for a record having all the data you append ( if no dup
can exist, just one record would be spotted).


Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top