Like and Dates

You forgot to change the OR in the Between clause to AND to ensure perfect workings....
The code wont ever cause a conflict since it will not get there.... but yeah
 
Where (MyDate >= [Forms]![frm_MainMenu2]![frm_Reports].[Form]![txtCDCContactNotesStartDate] OR [Forms]![frm_MainMenu2]![frm_Reports].[Form]![txtCDCContactNotesStartDate] Is Null)
AND (MyDate <= [Forms]![frm_MainMenu2]![frm_Reports].[Form]![txtCDCContactNotesEndDate] OR [Forms]![frm_MainMenu2]![frm_Reports].[Form]![txtCDCContactNotesEndDate] Is Null);

Take note of the parentheses. They are critical when using expressions that contain AND, OR, and NOT.
 

Users who are viewing this thread

Back
Top Bottom