BobRosas
asked on
Lookup ID of Record just inserted with SQL
I am using the following SQL code to insert a new record into tblCaseNotes. The key to this table is CaseNotesId (autokey) . After I insert the record is there a way to find out what the CaseNotesId just created is?
DoCmd.RunSQL "INSERT INTO dbo_tblCaseNotes(ClientFil eNo, SupportStaffLkUpID, CaseNotesDate) VALUES('" & _
dblClientNo & "','" & dblSSLkUpId & "','" & strCaseNoteDate & "');"
DoCmd.RunSQL "INSERT INTO dbo_tblCaseNotes(ClientFil
dblClientNo & "','" & dblSSLkUpId & "','" & strCaseNoteDate & "');"
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER