Results 1 to 6 of 6
  1. #1
    quandore is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    15

    using multiple combo boxes in one form

    Hi everybody, this is another newbie question. please be aware that i just started using access so i do not know the basics of programming with such software.

    i made a form from a "CS-PG1-PG2" table. then i added a subform that contains these 3 fields plus some more information.
    What i'm trying to do is to insert in the main form 3 combo boxes:

    CS (discount group): not to be linked/synchronized with the other two combos;
    PG1 (product group);
    PG2 (product group2): it must show the filtered results from PG1 combo box.

    As long as I insert the CS combo box, everything is fine. Whenever i add the other two combo boxes, or just the PG1 combo box, then the two of them conflict and i get zero records.

    All i want to do is to add these 3 combos and give an option to filter the results by CS or PG, plus give some sort of hierarchy order between the PG1 and the PG2.

    Hope i managed to explain my problem and that you can help me out.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  3. #3
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    481

    Need more information

    How is the subform linked to the main form? To the combo boxes? Maybe another way of isolating your problem is to ask: If you set aside the notion of a subform for a moment and made selections in the combo boxes, and then activated the other form, would you get the results you are expecting?

    Do you have references to the main form in the subform or are you somehow depending on the parent-child link?

  4. #4
    quandore is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    15
    Sorry if i didn't answer your question but I suspended this project during the past week or so.

    Now I'm back again. I'll try to give you more information:

    How is the subform linked to the main form? To the combo boxes?
    The subform is not linked now, I'm stuck. The CS combo box was linked to the subform through those parent/child things. It worked pretty smoothly. The problem arise when I added the PG1 and PG2 combo boxes. Then everything stopped working.

    I will also explain you how is the DB structured:

    Tables:
    MainTable IT: big tables with all the information regarding the Italian market
    MainTable GR: same as before, but for the Greek market
    Cs-PgTable: a table that includes all the CS's and PG's that I use for my combo boxes.

    Forms:
    MainForm: takes data from the Cs-PgTable
    SubForm IT: takes data from the MainTable IT
    SubForm GR: takes data from the MainTable GR

    Note that these two subforms can be selected one at a time by just choosing page 1 or 2 in the main form.

    I need your help...

    PS
    I'm pretty sure this all wrong, but hey, I've never done it before

  5. #5
    quandore is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    15
    any help would be much appreciated

    btw I managed to synchronize the PG1 and PG2 combo boxes. I used this code.

    Private Sub PG1description_AfterUpdate()
    Me.PG2description.Requery
    Me.PG2description = Me.PG2description.ItemData(0)
    End Sub
    and i added a WHERE criteria in the pg2description combo box.

    so good so far. but i still need to add the CS combo box without messing everything out!

  6. #6
    quandore is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    15
    Hello... last UP to see if anyone here can try to help me out :-)

    I don't know how to link an unbound combo box to a subform which has been added to display filtered data in a main form. This is the main problem. The only way i know to achieve that, is by creating a master-child relationship in the subform properties. My problem is, this way i can only add a combo box at a time. Can't manage to have multiple combo boxes related to the same subform.

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

Similar Threads

  1. Replies: 9
    Last Post: 06-04-2014, 10:45 AM
  2. Replies: 3
    Last Post: 01-30-2012, 09:43 AM
  3. Replies: 3
    Last Post: 09-29-2010, 09:31 AM
  4. Filter form from multiple combo boxes
    By Bird_FAT in forum Programming
    Replies: 6
    Last Post: 05-19-2010, 09:32 AM
  5. Combo boxes on a form
    By Maranna in forum Forms
    Replies: 1
    Last Post: 06-22-2009, 01:48 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