Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

Subform Help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ayo - 17 Jan 2008 19:26 GMT
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?
John W. Vinson - 17 Jan 2008 20:41 GMT
>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]
Ayo - 17 Jan 2008 21:27 GMT
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.

> >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
[quoted text clipped - 4 lines]
>
>              John W. Vinson [MVP]
John W. Vinson - 17 Jan 2008 22:25 GMT
>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
[quoted text clipped - 8 lines]
>>
>>              John W. Vinson [MVP]

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]
Ayo - 17 Jan 2008 22:51 GMT
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.

> >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
[quoted text clipped - 18 lines]
>
>              John W. Vinson [MVP]
John W. Vinson - 18 Jan 2008 00:20 GMT
>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]
Ayo - 18 Jan 2008 02:20 GMT
Thanks John.
That is what I ended up doing. Tab Pages.

> >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.
[quoted text clipped - 5 lines]
>
>              John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.