imperator
Archaeologist etc.
- Local time
- Today, 22:40
- Joined
- Feb 28, 2004
- Messages
- 38
Hi All
I am trying to use the following code on a form to record when the data in a record is modified:
It is 'sort of' working except that it fills in the fields even if I only view the record on the form and change nothing. Is this normal behaviour?
Ray
I am trying to use the following code on a form to record when the data in a record is modified:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo BeforeUpdate_Err
' Set bound controls to system date and time.
UserModified = fOSLogin()
DateModified = Date
TimeModified = Time()
BeforeUpdate_End:
Exit Sub
BeforeUpdate_Err:
MsgBox Err.Description, vbCritical & vbOKOnly, _
"Error Number " & Err.Number & " Occurred"
Resume BeforeUpdate_End
End Sub
It is 'sort of' working except that it fills in the fields even if I only view the record on the form and change nothing. Is this normal behaviour?
Ray