Hi all
I have a form which displays multiple items. I have a checkbox to indicate whether the item (an order) has been invoiced. If this is selected I want two other fields to be updated, the user and the date/time.
I'd like this to happen on the form instantly if possible into fields the user can't edit, or in the background (set as not visible).
I've had a go at the below code and entered it in to the afterupdate for the checkbox. It doesn't work, hence why I'm now here! The fields are tblWIPcomments_billed, which is the checkbox, tblWIPcomments_billedon which is the date field and tblWIPcomments_billedby which is the user field. I also have a procedure called getuser which finds and stores the current user.
Private Sub tblWIPcomments_billed_AfterUpdate()
If (Me.tblWIPcomments_billed) = "yes" Then
Me.tblWIPcomments_billedon = Now()
End If
End Sub
I have a form which displays multiple items. I have a checkbox to indicate whether the item (an order) has been invoiced. If this is selected I want two other fields to be updated, the user and the date/time.
I'd like this to happen on the form instantly if possible into fields the user can't edit, or in the background (set as not visible).
I've had a go at the below code and entered it in to the afterupdate for the checkbox. It doesn't work, hence why I'm now here! The fields are tblWIPcomments_billed, which is the checkbox, tblWIPcomments_billedon which is the date field and tblWIPcomments_billedby which is the user field. I also have a procedure called getuser which finds and stores the current user.
Private Sub tblWIPcomments_billed_AfterUpdate()
If (Me.tblWIPcomments_billed) = "yes" Then
Me.tblWIPcomments_billedon = Now()
End If
End Sub