Is there any way to create 2 subtables for a main table?

Our lawfirm MS Access database has multiple tables and forms (as does everyone). Often, I, meaning ME, want to look at a table of data (NOT A FORM) with 2 subtables. Main table is CONTACTS, subtables are LITIGATION INFORMATION, and MONIES IN. The main table key is "CONTACT ID," an autonumber field for CONTACTS; The subtable key for LITIGATION INFORMATION is "ID," an autonumber field, and the subtable key for MONIES IN is "INVOICE #," also an autonumber field;

I want the parent field as CONTACT ID, and the child fields to be ID and INVOICE #. However, when I use both fields, it restores back to AUTO each time. Any suggestions?

Please be advised, this IS NOT FOR MY USERS, this is only for my use (usually, it's a quick and dirty table search for data not searchable by the users). Is there any way to have the multiple subtables...YES, I already know it is not the preferred way, but it's just for my usage. Can it be done, and if so, how?

Thanks for your help guys, much appreciated in advance.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


You want to look at a table, with two different subdatasheets? Are they cascading? I.e. is MONIES IN a subdatasheet of  LITIGATION INFORMAITON? If so, you can do that. If now, there is no way around it. Normally, you can trust Access with automatic linking of subdatasheets, just tell it which you want, and it will be OK -- provided the proper relationships have been set up.

The you might have some confusion about "master" and "child" fields. In your example, CONTACT ID will always be the "master" field for the subdatasheet. The "child" field can only be the related field, probably also called CONTACT ID, as found on LITIGATION INFORMATION or MONIES IN (this is not clear from your explanations). However the "child" field will *never* be INVOICE #. This would mean that for CONTACT n°123, you want to see the INVOICE n°123...

Does that clarify?
satzmAuthor Commented:
No, MONIES IN is not a subdata sheet of LITIGATION INFORMATION, they are both "subforms" of the main form, CONTACTS, but not on the tables. They are indeed related, i.e. CONTACTS is the main table, related by a one to many relation for MONIES IN, and a one-to-one relationship for LITIGATION INFORMATION, but when I click on the PLUS sign for the CONTACTS Table, it makes me choose one or the other...I need both to load (to track litigation and the monies for filing, sheriff costs, settlement amounts, etc.) when clicked. Is it possible?

But, are you suggesting each related field in each table should have the same "master" name as CONTACT ID? Perhaps I have set up my database incorrectly, if you state such!

Please advise asap!


Why don't you just create a query with the three tables in and look at that ?
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

satzmAuthor Commented:
Because usually, it's to find a defendant or plaintiff from abnormal or partial search parameters, i.e. a first name, a partial phone number, a partial zip code, a state: sorted)...things other than the standard search parameters...and I would have to create a new query for something that is essentially disposable and only used once.

Instead, if I could do this on my FE, for my FE as opposed to my users, it is much simpler for me. I thought I saw something about this in one of the help files previously, but can't find it anymore. Can anyone help?
> They are indeed related, i.e. CONTACTS is the main table, related by a one to many relation for MONIES IN, and a one-to-one relationship for LITIGATION INFORMATION,

In that case, it's possible to throw everything together.

1) Create a new query based on CONTACTS and LITIGATION INFORMATION.
2) Set the proper relationship between them (the one-to-one link on CONTACT ID to ID?)
3) Double-click that link if you want to make certain that you see all contacts, even those without a matching record in the second table.

* Test the query. You should see all fields (or those you selected) from both tables, side-by-side.

4) Open the query properties and set this Subdatasheet Name: Table.MONIES IN
5) Set the appropriate names for link master field, i.e. CONTACT ID, and link child field, i.e. the one linking back to the contacts table.

You should now see rows with information from two tables, the [+] opening the subdatasheet for the third table.

Note, if you don't want all fields from MONIES IN, you can first create a query and then use that query as subdatasheet instead of the raw table.

Good luck!
satzmAuthor Commented:
Harfang: regretfully, I already tried this, and it simply merged the data of the contacts table and the litigation information onto one the Contacts file has about 200 fields, and the litigation information has about 25 fields, and the Monies in field has about 10 fields, I need to have the "subtable" with a plus sign for both tables at the same time. Can this be accomplished? Thanks for the help.
Well, in that case, the answer is no.

In "datasheet view", you can have only one active "subdatasheet" at a time. What you request is possible to some extent in Excel (but you still need one row for each + sign) so that you could have someone design an export that also creates the groups.

In Access, besides the query solution {http:#16478475} which you reject, you can use a main form showing Contacts, a second tab showing litigation information (as a left-join query or as a subform), and a subform (below or as a third tab) containing the "monies in". Anyway, if you need to display 225 fields plus several 10-field records, you will be better off with some amount of page layout and information grouping.

Again, the answer to "I need to have the 'subtable' with a plus sign for both tables at the same time" is "it can't be done".


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
satzmAuthor Commented:
Thanks for the assist, but I have to tell you...I saw a help screen previously that stated it could be done...I just don't remember how. Thanks for the help regardless though!!!
Why the "C" grade? I offered three workaround, and "it can't be done" is sometimes the correct answer.

Perhaps you should check out these links:
 • What's the right grade to give? {http:/help.jsp#hi73}
 • What's with the points? {http:/help.jsp#hi20}

Anyway, here is a bonus fourth solution, in the likely case that the same key is used for both relations:
 • Create a datasheet for CONTACTS
 • Sub-datasheet for MONIES IN
 • Sub-subdatasheet for LITIGATION INFORMATION
   [using MONIES IN key, which is == CONTACTS key]
Drawback: works only if there is a record in MONIES IN...

Again, as far as I know, you cannot have two [+] columns... sorry!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.