Hello,
I have a check box on my form that needs to display one of three messages, depending on certain criteria. Currently, I have these 3 scenarios:
1. A message displays if the check box is checked.
2. A message displays if a particular Date field is Null.
3. A message displays if the check box is checked and a particular Date field is Null.
The way I have my code set up currently, if scenario 3 is true, then ALL 3 messages pop up, one after the other. How can I modify the code below to check for each scenario and only display the message that meets that particular criteria?
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Private Sub Form_Current()
If Checked_Out_YN = True Then
MsgBox "This Item is currently Checked Out"
End If
If DCount("*", "qryMsgBoxCriteria", "Item='" & Me!Item & "' And IsNull(Actual_Pickup_Date)") Then
MsgBox "There is an active Reservation on this item, check for potential Date conflicts.", , "OPEN RESERVATION!"
End If
If DCount("*", "qryMsgBoxCriteria", "Item='" & Me!Item & "' And IsNull(Actual_Pickup_Date)") And Checked_Out_YN = True Then
MsgBox "There is an active Reservation on this item, check for potential Date conflicts. This Item is also currently Checked Out.", , "OPEN RESERVATION!"
End If
End Sub
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks!!