bumblingidiot
New member
- Local time
- Today, 13:36
- Joined
- Dec 1, 2011
- Messages
- 4
First from my user name I really just kind of stumble and bumble around access and various forums to get where I need to be with my database. But I think issue is a little too specific to just search for. Here is my issue:
What I want to query on is ProjectCode and DateFiled. I currently have a form (report type) where users will select the project and then choose the report type. This opens a second form with the project code already populated and the users enters a BeginningDate and EndingDate. If they leave the dates blank it should bring back all records.
My query is then set up with the parameter for the project code coming from the form ([Forms]![frmDateRange-SpecificProject]![txtProjectCode]). The date range is also pulled from the form (Between [Forms]![frmDateRange-SpecificProject]![txtStartDate] And [Forms]![frmDateRange-SpecificProject]![txtEndDate]). This all works fine.
However when I set up the additional criteria utilizing the fields such that with ([Forms]![frmDateRange-SpecificProject]![txtStartDate] or Is Null) and ([Forms]![frmDateRange-SpecificProject]![txtEndDate] or Is Null or Is Null) I now get all records regardless of the Project Code. It seems as if something about this code is causing it to ignore the project code criteria.
Any assistance, guidance, etc. is greatly appreciated.
What I want to query on is ProjectCode and DateFiled. I currently have a form (report type) where users will select the project and then choose the report type. This opens a second form with the project code already populated and the users enters a BeginningDate and EndingDate. If they leave the dates blank it should bring back all records.
My query is then set up with the parameter for the project code coming from the form ([Forms]![frmDateRange-SpecificProject]![txtProjectCode]). The date range is also pulled from the form (Between [Forms]![frmDateRange-SpecificProject]![txtStartDate] And [Forms]![frmDateRange-SpecificProject]![txtEndDate]). This all works fine.
However when I set up the additional criteria utilizing the fields such that with ([Forms]![frmDateRange-SpecificProject]![txtStartDate] or Is Null) and ([Forms]![frmDateRange-SpecificProject]![txtEndDate] or Is Null or Is Null) I now get all records regardless of the Project Code. It seems as if something about this code is causing it to ignore the project code criteria.
Any assistance, guidance, etc. is greatly appreciated.