B
Beeyen
Good Day,
I have a checkbox with the coding notice below. What is happening is the
date is populating the field through the checkbox. When you select the
checkbox the date is enter into a field next to the checkbox, if you deselect
the checkbox the date is removed from the same field next to the checkbox.
Before this all occurs when you first select the checkbox a dialog box with
"You tried to assign the Null value to a variable that is not a Variant data
type". Once you click on 'OK' the message goes away and the check enter in
the box and the date showns in the field. Could someone explain why this is
happening and assist me with the prevention of the error message?
Thank you in advance
Private Sub ASSIGNEDCHECKBOX_AfterUpdate()
If Me.ASSIGNEDCHECKBOX.Value = True Then
Me.[Assigned Date/Time] = Now() ' or now() for date/time
Else
Me.[Assigned Date/Time] = Null
End If
End Sub
I have a checkbox with the coding notice below. What is happening is the
date is populating the field through the checkbox. When you select the
checkbox the date is enter into a field next to the checkbox, if you deselect
the checkbox the date is removed from the same field next to the checkbox.
Before this all occurs when you first select the checkbox a dialog box with
"You tried to assign the Null value to a variable that is not a Variant data
type". Once you click on 'OK' the message goes away and the check enter in
the box and the date showns in the field. Could someone explain why this is
happening and assist me with the prevention of the error message?
Thank you in advance
Private Sub ASSIGNEDCHECKBOX_AfterUpdate()
If Me.ASSIGNEDCHECKBOX.Value = True Then
Me.[Assigned Date/Time] = Now() ' or now() for date/time
Else
Me.[Assigned Date/Time] = Null
End If
End Sub