T
Terrence Carroll
Can you please help with the following error message I get each time a user
updates the check box on a form that I have. I have a field that upon the
after update events of a couple of checkbox controls is supposed to update to
the current date if the checkbox is selected. I am getting an error message
indicate the following:
"The expression After Update you entered as the event property serrting
produced the following error: Object or class does not support the set of
events."
* The expression may not result in the name of a macro, the name of a user
defined function, or [Event Procedure].
*There may have been an error in evaluating the function, event, or macro
Listed below is the code I have tied to each event:
Private Sub Resolved_Status_AfterUpdate()
If Resolved_Status = True Then
Resolved_Date = Now()
Else
Resolved_Date = Null
End If
End Sub
Private Sub Timesheet_Missing_AfterUpdate()
Me.Audit_Date = Null
If Me.Hours_Match = True Then
Me.Audit_Date = Now()
ElseIf Me.Timesheet_Missing = True Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_OT_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_OT_Hours) Then
Me.Audit_Date = Now()
End If
End Sub
Private Sub Hours_Match_AfterUpdate()
Me.Audit_Date = Null
If Me.Hours_Match = True Then
Me.Audit_Date = Now()
ElseIf Me.Timesheet_Missing = True Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_OT_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_OT_Hours) Then
Me.Audit_Date = Now()
End If
End Sub
Private Sub VMS_OT_Hours_AfterUpdate()
Me.Audit_Date = Null
If Me.Hours_Match = True Then
Me.Audit_Date = Now()
ElseIf Me.Timesheet_Missing = True Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_OT_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_OT_Hours) Then
Me.Audit_Date = Now()
End If
End Sub
Private Sub VMS_Reg_Hours_AfterUpdate()
Me.Audit_Date = Null
If Me.Hours_Match = True Then
Me.Audit_Date = Now()
ElseIf Me.Timesheet_Missing = True Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_OT_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_OT_Hours) Then
Me.Audit_Date = Now()
End If
End Sub
Private Sub MJ_Reg_Hours_AfterUpdate()
Me.Audit_Date = Null
If Me.Hours_Match = True Then
Me.Audit_Date = Now()
ElseIf Me.Timesheet_Missing = True Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_OT_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_OT_Hours) Then
Me.Audit_Date = Now()
End If
End Sub
Private Sub MJ_OT_Hours_AfterUpdate()
Me.Audit_Date = Null
If Me.Hours_Match = True Then
Me.Audit_Date = Now()
ElseIf Me.Timesheet_Missing = True Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_OT_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_OT_Hours) Then
Me.Audit_Date = Now()
End If
End Sub
updates the check box on a form that I have. I have a field that upon the
after update events of a couple of checkbox controls is supposed to update to
the current date if the checkbox is selected. I am getting an error message
indicate the following:
"The expression After Update you entered as the event property serrting
produced the following error: Object or class does not support the set of
events."
* The expression may not result in the name of a macro, the name of a user
defined function, or [Event Procedure].
*There may have been an error in evaluating the function, event, or macro
Listed below is the code I have tied to each event:
Private Sub Resolved_Status_AfterUpdate()
If Resolved_Status = True Then
Resolved_Date = Now()
Else
Resolved_Date = Null
End If
End Sub
Private Sub Timesheet_Missing_AfterUpdate()
Me.Audit_Date = Null
If Me.Hours_Match = True Then
Me.Audit_Date = Now()
ElseIf Me.Timesheet_Missing = True Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_OT_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_OT_Hours) Then
Me.Audit_Date = Now()
End If
End Sub
Private Sub Hours_Match_AfterUpdate()
Me.Audit_Date = Null
If Me.Hours_Match = True Then
Me.Audit_Date = Now()
ElseIf Me.Timesheet_Missing = True Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_OT_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_OT_Hours) Then
Me.Audit_Date = Now()
End If
End Sub
Private Sub VMS_OT_Hours_AfterUpdate()
Me.Audit_Date = Null
If Me.Hours_Match = True Then
Me.Audit_Date = Now()
ElseIf Me.Timesheet_Missing = True Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_OT_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_OT_Hours) Then
Me.Audit_Date = Now()
End If
End Sub
Private Sub VMS_Reg_Hours_AfterUpdate()
Me.Audit_Date = Null
If Me.Hours_Match = True Then
Me.Audit_Date = Now()
ElseIf Me.Timesheet_Missing = True Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_OT_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_OT_Hours) Then
Me.Audit_Date = Now()
End If
End Sub
Private Sub MJ_Reg_Hours_AfterUpdate()
Me.Audit_Date = Null
If Me.Hours_Match = True Then
Me.Audit_Date = Now()
ElseIf Me.Timesheet_Missing = True Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_OT_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_OT_Hours) Then
Me.Audit_Date = Now()
End If
End Sub
Private Sub MJ_OT_Hours_AfterUpdate()
Me.Audit_Date = Null
If Me.Hours_Match = True Then
Me.Audit_Date = Now()
ElseIf Me.Timesheet_Missing = True Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.VMS_OT_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_Reg_Hours) Then
Me.Audit_Date = Now()
ElseIf Not IsNull(Me.MJ_OT_Hours) Then
Me.Audit_Date = Now()
End If
End Sub