Results 1 to 8 of 8
  1. #1
    kerry is offline Novice
    Windows 10 Office 365
    Join Date
    Jul 2021
    Posts
    4

    Question use a combo box on main form to control contents of subform

    Hi dear reader, I'm a total novice with Access and am struggling with the above in Access 365.


    The combo box on the main form is a list of customers sorted in ascending order from my customer file. I want to show all invoices associated with a customer selected in the combo box on a subform. Nothing I try is working and I'm about to pull what little hair I have left out!! Any assistance and/or video tutorial links would be very much appreciated. Thanks in advance all kind souls!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Have you set subform container Master/Child Links properties?

    Is main form bound to customers table?

    In combobox UNBOUND?

    Apply filter to main form and subform will synchronize.

    Provide your code or attach database for analysis.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    kerry is offline Novice
    Windows 10 Office 365
    Join Date
    Jul 2021
    Posts
    4

    Red face

    Quote Originally Posted by June7 View Post
    Have you set subform container Master/Child Links properties?

    Is main form bound to customers table?

    In combobox UNBOUND?

    Apply filter to main form and subform will synchronize.

    Provide your code or attach database for analysis.
    Hi June, thanks for your suggestions. I'll check them out but it might take me some time as I'm a new user. I did use the Wizard to create the form & subform and therefore believe all the appropriate controls should be in place. If I need to submit the "code" how do I do this (sorry to ask but I have no clue)?

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,820
    Hi Kerry

    Can you upload a zipped copy of the database?

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Copy/paste code into post. Place it between CODE tags - the # icon on post edit toolbar.

    Wizard creating form/subform will not create UNBOUND combobox. That would have to be a separate design action. In fact, form wizard would not create combobox at all unless it was designed in table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    kerry is offline Novice
    Windows 10 Office 365
    Join Date
    Jul 2021
    Posts
    4
    Quote Originally Posted by June7 View Post
    Copy/paste code into post. Place it between CODE tags - the # icon on post edit toolbar.

    Wizard creating form/subform will not create UNBOUND combobox. That would have to be a separate design action. In fact, form wizard would not create combobox at all unless it was designed in table.
    June7 - thank you, thank you, thank you for your assistance. The combobox was bound to the customer table so once I unbounded it, it all worked like a charm.

    Another question if I may - when the form and subform are initially displayed there is no value in the combobox but the subform is displaying information relevant to the first customer in the customer table. How do I prevent this from happening?

    Thanks again in advance.

  7. #7
    kerry is offline Novice
    Windows 10 Office 365
    Join Date
    Jul 2021
    Posts
    4
    Hi Mike, I have sorted the issue with the assistance of June7 however I want to say thanks for your offer of assistance, much appreciated by this novice!
    Stay safe and well.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Did you fix the record display issue?

    Could apply filter criteria when opening form that will not return any records.

    Or move to new record row on main form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 39
    Last Post: 07-28-2018, 12:27 PM
  2. Replies: 10
    Last Post: 07-05-2017, 11:31 AM
  3. Replies: 10
    Last Post: 02-20-2013, 07:04 AM
  4. Search Main Form Based on Contents in Subform
    By MintChipMadness in forum Forms
    Replies: 1
    Last Post: 08-09-2012, 02:45 PM
  5. Replies: 3
    Last Post: 03-29-2012, 12:40 PM

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