spectraflame
Well-known Member
- Joined
- Dec 18, 2002
- Messages
- 830
- Office Version
- 365
- Platform
- Windows
I have the following code set up to run on the on click event.
Private Sub CloseWOButton_Click()
Me.Status = "Closed"
Me.ClosedBy = Environ("Username")
Me.ClosedByDate = Now()
End Sub
The first 2 statements work correctly, but the last one to insert the current date and time errors out. The ClosedByDate text box is formatted as General Date.
Is there a better way to insert the current date and time from a button and store the result in field on the form as well as in the table?
Matthew
Private Sub CloseWOButton_Click()
Me.Status = "Closed"
Me.ClosedBy = Environ("Username")
Me.ClosedByDate = Now()
End Sub
The first 2 statements work correctly, but the last one to insert the current date and time errors out. The ClosedByDate text box is formatted as General Date.
Is there a better way to insert the current date and time from a button and store the result in field on the form as well as in the table?
Matthew