I
Iago
I found this code along with it's function on this discussion group. It works
great but I want it to populate the text field when the form loads.
How can I get the following code on the Form_Load()?
fOSUserName() is a defined function.
Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo BeforeUpdate_Err
' Set bound controls to system date and time and current user name
Me.DateModified = Now()
Me.ModifiedBy = fOSUserName()
BeforeUpdate_End:
Exit Sub
BeforeUpdate_Err:
MsgBox Err.Description, vbCritical & vbOKOnly, _
"Error Number " & Err.Number & " Occurred"
Resume BeforeUpdate_End
End Sub
great but I want it to populate the text field when the form loads.
How can I get the following code on the Form_Load()?
fOSUserName() is a defined function.
Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo BeforeUpdate_Err
' Set bound controls to system date and time and current user name
Me.DateModified = Now()
Me.ModifiedBy = fOSUserName()
BeforeUpdate_End:
Exit Sub
BeforeUpdate_Err:
MsgBox Err.Description, vbCritical & vbOKOnly, _
"Error Number " & Err.Number & " Occurred"
Resume BeforeUpdate_End
End Sub