Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006
    Posts
    1

    A Novice Question on one-to-many Main Form display

    Is the only way I can display the records from a one to many relationship on the main form, is by using a sub-form.

    Let me explain:

    I have three customers, (1, 2 & 3)

    I have six hubs associated with these there customers -

    cust hub
    1 1
    1 2
    1 3
    2 4
    2 5
    3 6

    Now, the easy way to display the customer and the hubs would be to create a form from a query of all customers, and then do a sub form with their correponding hubs.

    cust - 1
    hub 1
    hub 2
    hub 3

    cust - 2
    hub 4
    hub 5

    cust - 3


    hub 6

    However, if I build a form from a query of the customers and hubs, (which will create six records), how can I display the same info as above on the main form without using a subform but a tab control instead and also displaying each customer only once, (with the hubs in the tab control).

    I'm probably not making sense, but I want to see customer 1 on the main form, and be able to look at my tab control and see the first hub, and be able to advance within the tab control and see the next hub's information and so on, but at the same time, if I am moving forward on the customer, to have it only display once per customer on the main form. As it is now, when advancing through the customers, they display three times for the first, two for the second and once for the third.

    I guess I'm trying to learn if creating a subform is the only way i can get the results I want, for with a subform, I see datasheet view of all hubs associated with the customer, instead of one at a time.

    Hope someone can help me.

  2. #2
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    You could get all of these items on just your main form by using extra controls, probably unbound, that query the "many" table based on the info from the "one" table shown on the form. Presumably, you could implement this by using tab controls.

    However, I strongly urge you not to do this, for two very simple reasons: the subform approach is much simpler to implement, and is much more flexible.

    Today you need to get six records from the "many" table. What if, next month, the situation changes and now you need seven, or eight, or a different number? A subform implementation will likely accommodate the switch with little or even no changes, while the no-subform implementation will absolutely require changes, perhaps pretty sign ificant ones.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 08-17-2008, 12:19 PM
  2. Access Novice Taking On Large Project - Need Guidance
    By gtangjr in forum Database Design
    Replies: 1
    Last Post: 04-04-2008, 08:41 PM
  3. Replies: 2
    Last Post: 04-11-2006, 08:40 AM
  4. Access Relationship Display Question
    By dayrinni in forum Access
    Replies: 3
    Last Post: 02-05-2006, 11:16 AM
  5. Subform vs main form calculation
    By fadone in forum Forms
    Replies: 17
    Last Post: 12-21-2005, 07:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums