Link two table in one query

  • Thread starter Thread starter imtmub
  • Start date Start date
I

imtmub

I have 2 question.
1. How to link two table that contains same fields like another but
differnt time periods(example: one is 2005, another one is 2006). I
want to create a query to filter from both tables.

2. I have a form that contains 2 combo box. one is city(record source
from city table)and another categary (record source from categary
table). I have a command button to search the record what selected in
the both combo box from the query(what i want from the 1st question).

Thanks in advance
Imthiyaz
 
1) create a union query:
SELECT *
FROM tblNoNameGiven1
UNION ALL
SELECT *
FROM tblNoNameGiven2;

2) Set the criteria in your query to something like:
Forms!frmNoName!cboCity
and
Forms!frmNoName!cboCategory
 
Duane said:
1) create a union query:
SELECT *
FROM tblNoNameGiven1
UNION ALL
SELECT *
FROM tblNoNameGiven2;

2) Set the criteria in your query to something like:
Forms!frmNoName!cboCity
and
Forms!frmNoName!cboCategory
Answer is work for first question and thanks.
For second where i need to enter criteria. Bcz its a union query i need
to search the result of the combo box. I hope u understand now. pls
give some answer.
 
You can create a query based on your union query and set the criteria based
on your controls on your form as I indicated.
 

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

Back
Top