Ask Your Question
1

How to make a selection: X AND (Y OR Z) with the query wizard? [closed]

asked 2014-03-12 22:03:06 +0200

Chiel gravatar image

There is a Base with 2 tables. Table1 has a Boolean field X. Table2 has two Boolean fields Y and Z. The tables have a relation between other variables in the tables.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-20 07:21:19.366723

4 Answers

Sort by » oldest newest most voted
0

answered 2014-03-13 11:11:47 +0200

frofa gravatar image

updated 2014-03-13 11:27:13 +0200

Your question is not clear. Generally, you would need to make a QUERY using a JOIN of your two tables if you want to get a data from both tables in your RESULTS SET. See here for more info on JOINS. It might be easier to learn to use SQL than rely on the query wizard.

The tables have a relation between other variables in the tables.

NOTE: The rows of your two tables must have an ID number in common (i.e. primary & foreign key pairing) in order to do the join.

edit flag offensive delete link more
0

answered 2014-03-13 16:41:48 +0200

Chiel gravatar image

I found the solution. First I have edit in SQL the criterion X AND (Y OR Z) and after that I looked to the wizard. It shows:

Field X Y Z Criterion 1 1 or 1 1

Thank you for your advice to use SQL.

Now I understand how the wizard works

edit flag offensive delete link more

Comments

Must be:

Field_____X____Y_____Z

Criterion__1_____1

or_______1___________1

Hopefully better to read.

Chiel gravatar imageChiel ( 2014-03-13 16:49:35 +0200 )edit
0

answered 2014-03-13 10:33:30 +0200

Chiel gravatar image

Could be. But first my basic question: How to put in the query for Table1 and Table2 the selection: X AND Y? I can't find how to handle logical operators in the wizard.

edit flag offensive delete link more
0

answered 2014-03-12 23:41:40 +0200

m.a.riosv gravatar image

I think two condition rows, one with X and Y, and another with X and Z.
Or switch design view off and edit the SQL of the query.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-03-12 22:03:06 +0200

Seen: 817 times

Last updated: Mar 13 '14