VBA code for date criteria AfterUpdate
I have a form with a date on it called [all_date]
When the user presses the [completed] radio button the [comp_date] is populated via the following code:
Private Sub completed_AfterUpdate()
If Me.completed = True Then
Me.comp_date = Date
Else
Me.comp_date = Null
End If
End Sub
What I am looking to do is nullify the [completed] radio button if the [comp_date] is before the [all_date]
...so that the [comp_date] is Null and the [completed] radio button remains False
I have tried to AfterUpdate on the [comp_date] but Im getting lost.
This is for Users to illustrate what they have completed:
but not to be able to complete anything that has been allocated to them for tomorrow.
Hope you can help
I have a form with a date on it called [all_date]
When the user presses the [completed] radio button the [comp_date] is populated via the following code:
Private Sub completed_AfterUpdate()
If Me.completed = True Then
Me.comp_date = Date
Else
Me.comp_date = Null
End If
End Sub
What I am looking to do is nullify the [completed] radio button if the [comp_date] is before the [all_date]
...so that the [comp_date] is Null and the [completed] radio button remains False
I have tried to AfterUpdate on the [comp_date] but Im getting lost.
This is for Users to illustrate what they have completed:
but not to be able to complete anything that has been allocated to them for tomorrow.
Hope you can help
Last edited: