Hello and thank you in advance,
I've never posted anything so I'm sorry if I etquette is incorrect.
I've got my table set (haha) as well as a query form, and a basic select query. I've got 8 fields in my select query and on my query form. When I set up the criteria as "And" I have to enter data in each of my query form fields or it won't work. When I set up the criteria as "Or" the query returns anything that matches any of the fields. I know, basic stuff, but this is where I'm stuck.
What I'm trying to do: I want the query to return results as it does when I use "And," but only for the query form fields I fill in.
I've tried IIF, IsNull, Nz but I'm no programmer so I might have screwed it up.
Here's what the first few query fields look like:
WHERE ((([CD LOG].CD_NO) Between [Forms]![CD LOG Query Form]![CD START #] And [Forms]![CD LOG Query Form]![CD END #]) AND (([CD LOG].DATE_ISSUED) Between [Forms]![CD LOG Query Form]![DATE ISSUED START] And [Forms]![CD LOG Query Form]![DATE ISSUE END]) AND (([CD LOG].VIOLATION)=[Forms]![CD LOG Query Form]![VIOLATION])
I'm going home and won't be back for a couple of days.
I've never posted anything so I'm sorry if I etquette is incorrect.
I've got my table set (haha) as well as a query form, and a basic select query. I've got 8 fields in my select query and on my query form. When I set up the criteria as "And" I have to enter data in each of my query form fields or it won't work. When I set up the criteria as "Or" the query returns anything that matches any of the fields. I know, basic stuff, but this is where I'm stuck.
What I'm trying to do: I want the query to return results as it does when I use "And," but only for the query form fields I fill in.
I've tried IIF, IsNull, Nz but I'm no programmer so I might have screwed it up.
Here's what the first few query fields look like:
WHERE ((([CD LOG].CD_NO) Between [Forms]![CD LOG Query Form]![CD START #] And [Forms]![CD LOG Query Form]![CD END #]) AND (([CD LOG].DATE_ISSUED) Between [Forms]![CD LOG Query Form]![DATE ISSUED START] And [Forms]![CD LOG Query Form]![DATE ISSUE END]) AND (([CD LOG].VIOLATION)=[Forms]![CD LOG Query Form]![VIOLATION])
I'm going home and won't be back for a couple of days.
Last edited: