Hi.
i am adding new record to form but primary key is updated only when i am going to next record (or saving current one).
something like here:
https://www.experts-exchange.com/que...xt-record.html
I am trying to avoid this creating button with code:
Code:
If Me.NewRecord Then
DoCmd.RunCommand acCmdSaveRecord
MsgBox "Record added"
Me.Recalc
Else
MsgBox "ups"
End If
but code before saving record is going to beforeupdate event:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord Then
Call AuditChanges("TopoToJunction_ID", "NEW")
Else
Call AuditChanges("TopoToJunction_ID", "EDIT")
End If
End Sub
Within this event i am calling function to track changes within audti table.
Problem is that here i am using field TopoToJunction_ID which is not updated until current, inserted record is saved...
Can you help?
Best,
Jacek