@Joe4You are welcome.
Wondering if you can help me again?!!!
Now that I've got the basic validation working I need to use it - but against a number of dates, not just one ...
This code works perfectly for a single date ...
VBA Code:
If Format$(txtDate1, "yyyy/mm/dd") < Format$(txtReportedDate, "yyyy/mm/dd") And txtDate1 <> "" Then
MsgBox "Date must be on or after the Reported Date, please correct and Save again"
Exit Sub
End If
... but I also have Date2 ... Date6 and I want to test them once only ie not a separate test for each date ...
I've tried ...
VBA Code:
If (Format$(txtDate1, "yyyy/mm/dd") < Format$(txtReportedDate, "yyyy/mm/dd") Or _
' Format$(txtDate2, "yyyy/mm/dd") < Format$(txtReportedDate, "yyyy/mm/dd") Or _
' Format$(txtDate3, "yyyy/mm/dd") < Format$(txtReportedDate, "yyyy/mm/dd") Or _
' Format$(txtDate4 "yyyy/mm/dd") < Format$(txtReportedDate, "yyyy/mm/dd") Or _
' Format$(txtDate5, "yyyy/mm/dd") < Format$(txtReportedDate, "yyyy/mm/dd") Or _
' Format$(txtDate6, "yyyy/mm/dd") < Format$(txtReportedDate, "yyyy/mm/dd")) _
' And ((Format$(txtDate1, "yyyy/mm/dd") <> "" Or Format$(txtDate2, "yyyy/mm/dd") <> "" Or _
' Format$(txtDate3, "yyyy/mm/dd") <> "" Or Format$(txtDate4, "yyyy/mm/dd") <> "" Or _
' Format$(txtDate5, "yyyy/mm/dd") <> "" Or Format$(txtDate6, "yyyy/mm/dd") <> "") Then
' MsgBox "Dates must be on or after the Reported Date, please correct and Save again"
' Exit Sub
'End If
... but get a syntax error that I can't work out ...
Can you help please?
Thanks ...