Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show two tables with the same fields as one table?

Status
Not open for further replies.

sarajini

MIS
Jun 30, 2003
24
US

Hi,
I have a table of old records and a table of new records. They have identical fields (same number of fields, same names for the fields, same types of values).

I want to display them in the same datasheet view, listing each field only once. Old records (1-100) should be listed _above_ new records (101-200).

Though I want to be able to display them in the same datasheet, the two tables should remain separate.
Also, I want to base a subform on this "combined" query.

How can I do this? I was thinking about a union query, but don’t union queries only work when combining identical fields _and_ identical values?

Thanks, friendly computer folks...
sarajini
 
union query is what you want. you have to have the same number of fields in the query, in the same order. whatever the field names are in the first table of the union query, that's what the field names will be. just start writing it and you will find out soon enuf if there are errors.

you can simply select all fields of each table:

Select * from [OLDTable] UNION
Select * from [NewTABLE];



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top