Comb box from a field in 2 tables

  • Thread starter Rpt_Me4NotBeingSmart
  • Start date
R

Rpt_Me4NotBeingSmart

Here is the idea,
I have two tables, current records and archived records. I would like a
combo box to display, unique values from a field called Agent that is in each
table. So far, no good. Any suggestions?
 
A

Allen Browne

Use a UNION query:

SELECT AgentName
FROM Table1
WHERE AgentName Is Not Null
UNION
SELECT AgentName
FROM Table2
WHERE AgentName Is Not Null
ORDER BY AgentName;
 
K

KARL DEWEY

It is best to NOT have two tables but use one with a field to indicate
current records and archived records using a Yes/No field. Then there is no
need to append and delete when a record changes status.
Then all data is readily available. Just use criteria if you only want
current.
 

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