The task:
If there's nothing in textbox 2 (SecondDate) then Calculate the days since the date (FirstDate) in textbox1.
But if there is a date in textbox 2 (SecondDate), then calculate the days since that date.
My code is not right, I can see that (and so can Access!). Be grateful for guidance.
If IsNull([SecondDate]) Then
MsgBox "A message"
Me.txtBox4 = Date - ([Me.FirstDate]) & " days"
Else
MsgBox "Another message"
Me.txtBox4 = Date - ([Me.SecondDate]) & " days"
End If
If there's nothing in textbox 2 (SecondDate) then Calculate the days since the date (FirstDate) in textbox1.
But if there is a date in textbox 2 (SecondDate), then calculate the days since that date.
My code is not right, I can see that (and so can Access!). Be grateful for guidance.
If IsNull([SecondDate]) Then
MsgBox "A message"
Me.txtBox4 = Date - ([Me.FirstDate]) & " days"
Else
MsgBox "Another message"
Me.txtBox4 = Date - ([Me.SecondDate]) & " days"
End If