problem with yes/no criteria

dan_man

New member
Local time
Today, 08:32
Joined
Mar 14, 2013
Messages
7
Hi,

:banghead: I have a database with two tables structured as in attachement. In a nutshell I have a list of values with two criteria associated in one table and a second table with a 3-rd criteria. What I need is to have a query with a list of values (corresponding to Criteria 1=yes) if Criteria 3 is on "Yes", and with another list of values (corresponding to Crirteria 2=yes) if Criteria 3 is on "No". Can this be solved only in one query? Please advice. Thank you.
 

Attachments

Hello dan_man, Welcome to AWF.. :)

I have to be honest, the description is not helping.. Could you give another shot? By showing what you wish to see in the result from a sample data? You could use the CODE tags to preserve the formatting..
 
Hi - is this what you are looking for?

Code:
SELECT DISTINCT tblValue.ID_Values, tblValue.Values
FROM tblValue INNER JOIN tblCriteria ON tblValue.ID_Values = tblCriteria.ID_Values
WHERE (((([criteria1]*[criteria3]))=1)) OR (((Abs([criteria2]+[criteria3]))=1))
 
Hi Eugin,
I want to see a list of values corresponding to criteria1=yes when ctiteria 3 is on "yes" and a list of values corresponding to criteria2=yes when criteria 3 is on "no".
I am sorry for my bad description but english is not my primary language.

Best Regards,

Dan
 
Last edited:
Hi CJ,
I am quite new in Access so please be more explicit. Where I have to introduce this code? Thank you for understanding
Best Regards,

Dan
 
In the db you posted, open the query in design view, select SQL view (button top left which will have a triangle in it) and paste what I sent to replace the code that you have.

Then either select Design or View as required
 

Users who are viewing this thread

Back
Top Bottom