Query Criteria Help

leedub

Registered User.
Local time
Today, 06:48
Joined
Jul 9, 2013
Messages
18
Im working in MS access 2007.

What im trying to do is fairly simple i just dont have the ability to correctly code what i want to do.

I want to filter my query based on some criteria in multiple columns. But i only want the query to filter based on the specific criteria if a checkbox has been selected.

Basically i want the criteria for one of the coloums criteria to read

IF a check box "Check0" is selected THEN filter the column to only records that = 1 and if "Check2" then filter all records that = 2

Any advice is apreciated!
 
Try this in the criteria row for the field in query
Code:
IIF(Forms!FormName!Check0,1,IIF(Forms!FormName!Check1,2,"*"))
 
What if both are checked?

Are these checkboxes on a form or part of the table data?

Brian
 
Reading through other posts I notice that you have another thread similar but more comprehensive than this, what's going on? Multi posting is very annoying.

Brian
 
Sorry but yes the other post is the same problem that i am trying to fix. It might be easy to talk in the other post because it supplies more information about my problem.

But to answer your questions. The check boxes are on a form, and if both are check i want it to filter so that it shows applies a filter for "Tranche" = 2 and 1.
Any ideas on how to fix it??
 

Users who are viewing this thread

Back
Top Bottom