Link to home
Create AccountLog in
Avatar of BobRosas
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(ClientFileNo, SupportStaffLkUpID, CaseNotesDate) VALUES('" & _
        dblClientNo & "','" & dblSSLkUpId & "','" & strCaseNoteDate & "');"
ASKER CERTIFIED SOLUTION
Avatar of sstolp2005
sstolp2005

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of BobRosas
BobRosas

ASKER

Great!  Thank you so much!