4charity
asked on
record field name on dirty
I am trying to debug an issue I have on a form.
I would like to see which control on the form is being changed by the end-user, and record the name of that control in a text field when the form is actually changed.
I would like to set this on the Form Dirty Event, but not sure how to do it. I am also capturing the date and user on this Event. So far this is what I have:
Private Sub Form_Dirty(Cancel As Integer)
Me.Date1 = Now()
Me.Text = GetUserCredentials(2)
Me.Text2 = ???????????
End Sub
I would like to see which control on the form is being changed by the end-user, and record the name of that control in a text field when the form is actually changed.
I would like to set this on the Form Dirty Event, but not sure how to do it. I am also capturing the date and user on this Event. So far this is what I have:
Private Sub Form_Dirty(Cancel As Integer)
Me.Date1 = Now()
Me.Text = GetUserCredentials(2)
Me.Text2 = ???????????
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Of course!
Not sure of the capture logic though.
Not sure of the capture logic though.
ASKER
Perfect. I did add:
Me.Dirty = False
at the end of the code, to make it record.
Me.Dirty = False
at the end of the code, to make it record.
The easiest way to capture this would be to trap the "AfterUpdate" event on each control, and then call a routine to write the details you want to capture (passing through to the routine the name of the control being updated).
I am not aware of the Form_Dirty event capturing details of the control being changed, happy to be contradicted though.