Results 1 to 9 of 9
  1. #1
    10 Gauge's Avatar
    10 Gauge is offline Getting the hang of it...
    Windows 7 64bit Access 2007
    Join Date
    Feb 2011
    Location
    Fredericksburg, VA
    Posts
    202

    Question Linking Subforms on Unbound Master Form?

    I am setting up a Purchase Order system and my initial thought and layout is to have 3 subforms on an unbound master form.



    The first subform is a list of Repair Order #'s.

    The second subform is a list of Purchase Orders for the selected Repair Order.

    The third subform is a list of Return Purchase Orders for the selected Repair Order.

    How would I go about linking the second and third subforms to display the information related to the selected record in the first subform?

    Thanks for any help.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    well its not entirely clear from your post. the way you post it - you imply that there is multiple POs to a Repair Order........and multiple 'return POs' also.....

    keep in mind that one can not put a subform into a continous (list) form....subforms only go into single forms....

    it sounds to me your Repair Order is your main form; in this form you have a combo or list box in the header that selects the order to go to.

    then you have a PO subform and RPO subform.....

    Hope it helps.

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    If your main form is unbound you can't link a subform to it. You can however only show records associated with the item displayed on the main form by using a query to look up any value associated with the primary key on the main form (I'm assuming you're populating it in a text box or on a list box/combo box or something of that nature)

    Bear in mind though that if your main form is unbound you will have to specifically tell your subform to inherit the primary key of the main form or you will create a bunch of orphaned elements in your subforms.

  4. #4
    10 Gauge's Avatar
    10 Gauge is offline Getting the hang of it...
    Windows 7 64bit Access 2007
    Join Date
    Feb 2011
    Location
    Fredericksburg, VA
    Posts
    202
    Ok thanks for the ideas and suggestions.

    I just decided to make one of the subforms the master form and then add the other 2 subforms.

    Here's my next question, I am trying to add a 3rd subform now that's related to the data in subform 2. How can I link 2 subforms together so that when I choose a record in subform 2 it updates subform 3 with the related data?

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Without knowing how your form is set up I can't answer this.

    Is your structure like this:

    MAIN FORM---->SUBFORM1---->SUBFORM2

    If all the forms are bound forms (which you indicate you have done I think) then subform2 will inherit the key field from subform1 whenever you add something new to subform2. Subform1 will inherit the key field from MAIN FORM whenever you add something new to subform1.

    Or is your structure like this:

    Code:
              ------>SUBFORM1
    MAIN FORM<
              ------>SUBFORM2
    And you're trying to pass a value from subform1 to subform2 without them being related via parent/child?

  6. #6
    10 Gauge's Avatar
    10 Gauge is offline Getting the hang of it...
    Windows 7 64bit Access 2007
    Join Date
    Feb 2011
    Location
    Fredericksburg, VA
    Posts
    202
    The first 2 subforms are linked to the main form.

    I am trying to link the 3rd subform to the 2nd subform.


  7. #7
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    So you're trying to make RPOPARTS Subform1 a subform of RETURN PURCHASE ORDERS?

    You would probably have to go into the design of RETURN PURCHASE ORDERS and create the subform in that one. You're using the default design which I never use so it's hard to give you direction but try creating your RPOPARTS Subform1 within the RETURN PURCHASE ORDERS form and see what happens.

  8. #8
    10 Gauge's Avatar
    10 Gauge is offline Getting the hang of it...
    Windows 7 64bit Access 2007
    Join Date
    Feb 2011
    Location
    Fredericksburg, VA
    Posts
    202
    That definitely works adding it as a subform to the subform. It's not quite the layout I was hoping for but I think it will have to do for now at least!

    Thanks.


  9. #9
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    That's why I design my own subforms rather than using the default, the default forms never really give you exactly what you want.

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

Similar Threads

  1. Replies: 4
    Last Post: 06-22-2011, 10:53 AM
  2. Replies: 22
    Last Post: 03-15-2011, 07:17 AM
  3. Problem linking subforms, filtering and uploading
    By sameerk0286 in forum Access
    Replies: 1
    Last Post: 12-09-2010, 09:18 AM
  4. Master/Child between Subforms
    By Pilotwings_64 in forum Forms
    Replies: 3
    Last Post: 08-22-2010, 01:45 AM
  5. Replies: 2
    Last Post: 04-11-2006, 08:40 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