Results 1 to 2 of 2

Combo Box and Subforms

  1. #1
    batman11692003 is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2012
    Posts
    1

    Combo Box and Subforms

    Hello

    I just recently started using Access and can't figure out a couple of things, any help is appreciated

    I am trying to filter a table using a Combo Box which then displays a subforms based on field selected in the Combo Box. But the same name appears in the combo box if its enter in the table multiply times. I tried to type distinct in the Row Source but there was no effect.

    Also in the Subform I am trying to calculate the Average, which I get it to work but for some reason there's a third row added to the subform row.

    Thanks
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline Moderator
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    28,636
    The Distinct doesn't work because you include the ID in the SQL. Each ID is unique which makes each record unique and all are retrieved. If purpose of combobox is to find a specific record of the subform, then the ID is needed. Would have to include every field in the combobox to display each row of the combobox as a unique line.

    You have only one table and both forms are bound to this table. Not much of a relational database. Two open forms bound to the same data is not really a good idea. Review this thread about relational database principles http://forums.aspfree.com/microsoft-...es-208217.html
    To provide db: Make copy, remove confidential data, run compact & repair, zip if large - 2mb allowed, attach to post. Attachment Manager is below the Advanced post editor window.
    If suggestion in this post resolves your issue, please use the Thread Tools and mark the thread as Solved!

    Debug!Debug!Debug! http://www.cpearson.com/excel/debug.htm

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

Similar Threads

  1. Replies: 13
    Last Post: 11-16-2011, 11:39 PM
  2. Help with Subforms/Combo Boxes
    By mikel in forum Forms
    Replies: 11
    Last Post: 06-03-2009, 06:45 AM
  3. Help with subforms
    By chocpoc in forum Forms
    Replies: 0
    Last Post: 05-20-2009, 10:50 PM
  4. SubForms
    By duckie10 in forum Access
    Replies: 4
    Last Post: 05-17-2009, 06:15 PM
  5. Continuous Subforms Filter Dependant Combo
    By BigBear in forum Forms
    Replies: 0
    Last Post: 04-19-2009, 07:13 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
  •  
Tech Forums: Microsoft Office Forums