Hello,
Here is my script to handle a few errors on my form before the user can print:
If De > A Then
Msgbox "Your FROM date cannot be bigger than your TO date"
ElseIf IsNull(Mandat) Then
Msgbox "Please enter the file number!"
ElseIf IsNull(De) Then
Msgbox "Your FROM date cannot be blank!"
ElseIf IsNull(A) Then
Msgbox "Your TO date cannot be blank"
ElseIf IsNull(Daterequis) Then
Msgbox "You must enter a due date!"
Else
DoCmd.OpenReport "Requete Lawson AP", acViewPreview
End If
I would also like to add that the user cannot put a due date that is smaller then today... I've tried using "Today()" but it does not work.
Any suggestions or any idea on how to simplify my code??
Thank you
Here is my script to handle a few errors on my form before the user can print:
If De > A Then
Msgbox "Your FROM date cannot be bigger than your TO date"
ElseIf IsNull(Mandat) Then
Msgbox "Please enter the file number!"
ElseIf IsNull(De) Then
Msgbox "Your FROM date cannot be blank!"
ElseIf IsNull(A) Then
Msgbox "Your TO date cannot be blank"
ElseIf IsNull(Daterequis) Then
Msgbox "You must enter a due date!"
Else
DoCmd.OpenReport "Requete Lawson AP", acViewPreview
End If
I would also like to add that the user cannot put a due date that is smaller then today... I've tried using "Today()" but it does not work.
Any suggestions or any idea on how to simplify my code??
Thank you