none
How can I determine which record was just added in the AfterInsert event in VBA? RRS feed

  • Question

  • After a record is added, I need to, conditionally, update one the fields in the newly added record. In the AfterInsert event of my form I tried getting the ID of the new record with

    newId = CurrentDb.OpenRecordset("SELECT @@Identity")(0)

    But newId is always zero.

    How do I determine which record triggered the event?

    Thanks.

    J


    http://digitalcamel.blogspot.com/

    Thursday, May 5, 2016 6:24 PM

Answers

All replies