Union Query

A

Ang

Hi,

In Access 2003, I have some data coming from an accounting package which I
am importing to tbl_TempData as a linked table. I have a form with 3 combo
boxes which have a query attached to each combo boxe. Queries are
qry_Query1, qry_Query2 and qry_Query3. The first query filters for the date
selected in the first combo box, the second filters from selection made in
the second combo box and so on. The report comes from qry_UnionQuery which
is a union query of the three queries from the combo boxes. The report is
showing results matching ANY of the queries. I would like it to show results
matching ALLl criteria i.e. all jobs matching selected project completed on
the date selected within the selected area.

Any help would be fantastic.

Thank you
 
L

Lou

Hi,

In Access 2003, I have some data coming from an accounting package which I
am importing to tbl_TempData as a linked table.  I have a form with 3 combo
boxes which have a query attached to each combo boxe.  Queries are
qry_Query1, qry_Query2 and qry_Query3.  The first query filters for thedate
selected in the first combo box, the second filters from selection made in
the second combo box and so on.  The report comes from qry_UnionQuery which
is a union query of the three queries from the combo boxes.  The reportis
showing results matching ANY of the queries.  I would like it to show results
matching ALLl criteria i.e. all jobs matching selected project completed on
the date selected within the selected area.

Any help would be fantastic.

Thank you

Am I reading the post correctly?


The Row Source for cboDate1 is

SELECT DISTINCT Date1
from tbl_TempData

The Row Source for cboDate2 is

SELECT DISTINCT Date2
from tbl_TempData
where Date1 = me.cboDate1.value

The Row Source for cboDate3 is

SELECT DISTINCT Date3
from tbl_TempData
where Date1 = me.cboDate1.value
and Date2 = Me.cboDate2.value

If this is true, why isn't the Record Source for the of the report

SELECT *
from tbl_TempData
where Date1 = me.cboDate1.value
and Date2 = Me.cboDate2.value
and Date3 = Me.cboDate3.value

( I have omitted the quotation, continuation and concatenation
characters to make these queries easier to read. )
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top