Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating with ADO and determining record ID before closing recordset.

Status
Not open for further replies.

dbero

Technical User
Mar 31, 2005
109
0
0
US
Hello:

I am using the basic code below to load data from a non-bound form.
LoadErrorData.Open "TblDemographics", CurrentProject.Connection, adOpenKeyset, adLockOptimistic


LoadErrorData.AddNew
LoadErrorData!FamilyName = Family
...
LoadErrorData.Update
LoadErrorData.Close

I now want the the ID for the record just added so i can use it to add a related record. is there anyway to get the ID for this newly added record w/o opening a new recordset? Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top