On the first day of every month, this code results in an error
if I am inputting a date from the previous month.Code:ElseIf Me.txtReceiptDate & " " & Me.txtReceiptTime > Format(Now(), "dd/mm/yyyy hh:nn") = True Then MsgBox "Date out of range." & vbCrLf & vbCrLf & "'Receipt Date / Receipt Time' cannot be set in the future " & _ "and must be less than the current date and time - " & Format(Now(), "dd/mm/yyyy hh:nn") & ".", vbInformation, "Information" Me.txtReceiptDate.SetFocus
Would really appreciate help to patch the code.
Thanks!