I'm trying to have a code that would save the last modified date/user in a main form when a change has been made in the record including all the subforms I have.
Currently, This code works perfectly only for records in the main form but not for records in subforms. How would I include the last modified date/user for the subforms?
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Dirty Then
Me.LastModifiedDate = Now
Me.LastModifiedUser = Environ$("username")
End If
End Sub