Subform Help

A

Ayo

Is it possible to use two tables for one subform? And if so, how do you do
that? If not, how would I go about filling a subform with data from two
different tables?
 
J

John W. Vinson

Is it possible to use two tables for one subform? And if so, how do you do
that? If not, how would I go about filling a subform with data from two
different tables?

How are the tables related? What information is in one table as opposed to the
other?

John W. Vinson [MVP]
 
A

Ayo

They both have project number, task number and site ID on them both neither
table has a unique identifier (key). That was why I didn't link them to start
with.
 
J

John W. Vinson

They both have project number, task number and site ID on them both neither
table has a unique identifier (key). That was why I didn't link them to start
with.

If they have the same number of fields of the same datatypes, you can create a
UNION query (see UNION in the online help) and base your subform on this
query. It won't be updateable.

Why two tables for the same kind of data though? Or are there other fields
you're not describing? What real-life Entity (person, event or thing) do these
tables represent?

John W. Vinson [MVP]
 
A

Ayo

There are other fields that are not common to both table. There's why I have
2 tables. One of the tables has 3 fields that are not in the other one.
 
J

John W. Vinson

There are other fields that are not common to both table. There's why I have
2 tables. One of the tables has 3 fields that are not in the other one.

Then I guess I don't understand. How could one subform display data from two
different tables? Why not use two subforms (perhaps on different tab pages)?
Is there any relationship between the two subforms' tables (other than that
they are both presumably related one to many to the mainform's table)?

John W. Vinson [MVP]
 
Top