Unanswered: If a date it null in a form cannot go to next record
Hello all, I am having difficulties and am hoping that someone might know how to fix this. (I am very new to VBA)
So, what I have is a form (In edit mode) that has the following values:
Start Date - Preassigned
Due Date - Preassigned
Completed Date (they need to enter)
Task Complete (Check box they need to enter)
Date Entered (auto fill with code if me.Task_Complete = -1 Then me.Date_Entered = now() )
Anyway, what I am attempting to do is if the task complete box is checked, then they must have a date entered in the completed date. (Since these managers might do the assigned task and then wait a week to mark it complete)
Here is the code that I currently have:
Private Sub Task_Completed_Click()
If Me.Task_Completed = -1 Then
Me.Date_Entered = Now()
Me.Date_Completed = ""
MsgBox "Please enter the date you completed the task", vbinfomration, "Date Needed"
I thought this would work, but unfortunately it doesn't.
Could someone please tell me what I am doing wrong?