Union Query???

C

Chris

I have 2 tables with fields:
tblOne.oneID
tblOne.oneName

tblTwo.twoID
tblTwo.Name


I am trying to set source for a combo box that will list the Name field for:
1) All the records in tblOne
2) Only the records in tblTwo with ID that is NOT in tblOne.

I tried Union Query but that gives me all the records in both tables. tblOne
has several thousand records; tblTwo would have no more than 100 or so .
tblTwo is used for Pending actions that could include either a brand new
record to be added to tblOne (would have new ID) or some modification to
record that already exists in tblOne (tblTwo ID would be copied over).

Any suggestions would be more than gratefully accepted. Thank you.
 
R

Rebecca Riordan

You're close...instead of using table two as one of the tables in the query,
create a query that selects only the unmatched records (there's a wizard to
help you), and combine the query with table one.

HTH

--
Rebecca Riordan, MVP

Designing Relational Database Systems
Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step

http://www.microsoft.com/mspress

Blessed are they who can laugh at themselves,
for they shall never cease to be amused...
 

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

Similar Threads

Go To Record 1
Adding New records in multiple tables 2
Combo rowsource question 2
Updating "Bad" Records 1
update method 3
Code Syntax Help 6
Me.Dirty Help 2
query substitution 4

Top