J
John Smith
Hi,
I have VB code that does
DoCmd.RunSQL
"INSERT INTO [myTable] ( fieldName) " & _
"VALUES ('" & NewData & "');"
Table myTable has an AutoNumber ID.
Is there a way I can know the ID of the new record, so that I can do
stLinkCriteria = "[ID_myTable]='" & (something like newlyCreatedID) &
"'"
DoCmd.OpenForm myFormName, , , stLinkCriteria
just afterwards?
I have VB code that does
DoCmd.RunSQL
"INSERT INTO [myTable] ( fieldName) " & _
"VALUES ('" & NewData & "');"
Table myTable has an AutoNumber ID.
Is there a way I can know the ID of the new record, so that I can do
stLinkCriteria = "[ID_myTable]='" & (something like newlyCreatedID) &
"'"
DoCmd.OpenForm myFormName, , , stLinkCriteria
just afterwards?
otherwise than querying max(ID), as this is a multiuser