Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Synchronizing Combo Boxes (2003)

    I have been trying to make two combo boxes so that when you choose one option from the category box it will give you only the related items from the subcategory table.

    ListCategory <table>
    AutoID [Column 1] - AutoNumber
    Category [Column 2] - Category Information

    ListSubCategory <table>
    ID [Column 1] - Has all of the same numbers as the categories AutoID. Example: if Category 1 had 3 sub-categories all three sub-categories would have a 1 in this column.
    Sub-Category [Column 2] - Sub-Category Information


    [1st Combo Box]
    Name: TxtCategory
    RowSourceType: Table/Query
    RowSource: ListCategory
    ColumnCount: 2
    ColumnWidths: 0";1"
    BoundColumn: 1
    AfterUpdate: [Event Procedure]

    Me.TxtSubCategory.RowSource = "SELECT Sub-Category FROM" & _
    "TxtSubCategory WHERE ID = " & Me.TxtCategory & _
    "ORDER BY Sub-Category"
    Me.TxtSubCategory = Me.TxtSubCategory.ItemData(0)

    [2nd Combo Box]
    Name: TxtSubCategory
    RowSourceType: Table/Query
    ColumnWidths: 2"
    Width: 2"


    I believe that I was able to get this to work in a different database, but I have since deleted that database and I have not been able to get this to work again. I may be way off with this so if there is an easier way to get this to work please let me know.

    Thank you for all of your assistance.

    Bill

  2. #2
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Synchronizing Combo Boxes (2003)

    Bill

    Check out

    Cascading Combo Box Demo Question? (A2k (9.0.3821) SR-1 )
    <post#=132,255>post 132,255</post#>

    HTH, John

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •