need to update fields in a query.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
Back
Top