I have a form called "New Report" and I have 3 text boxes on it. There is a subform that pulls a query.
One field is SDATE (formatted for date)
One field is EDATE (Formatted for date)
One field is IDNUM (formatted as text)
In the query I want to filter by ID number if one is entered into the text box IDNUM. In the conditions field of the query for IDNUM I have the following.
Code:
IIf([Forms]![New Report]![IDNUM]=Null,Null,[Forms]![New Report]![IDNUM])
It somewhat works if I put an ID number in the field however if I leave it blank it does not ever return any records. When left blank I would like it to return all records.
Thank you,
Brad