Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Unanswered: synchronizing three combo boxes

    there is a report associated with this. the manager want users to be able to just type in a code and by the code they pick the two combo boxes will automatically have the category and services associated with that code. so if they pick. I got some help with this before
    http://www.dbforums.com/microsoft-ac...ml#post6428070

    Was wondering do I add a combo box named TanfCodes, should I use that for the users to choose from then have it populated the other two combo boxes which are named [servicescovered] and [category]
    Code:
    Combo1.RowSource = "SELECT FamilyHrID, TypeOfParticipant, WeeklyHours, MonthlyHours FROM FamilyHours_tbl"
    Combo1.ColumnCount = 4
    Combo1.ColumnWidths = 0cm;2,503cm;0cm;0cm (sorry: in centimetres here!)
    Combo1.BoundColumn = 1
    Combo1.LimitToList = True
    
    Combo2.RowSource = "SELECT FamilyHrID, WeeklyHours FROM FamilyHours_tbl"
    Combo2.ColumnCount = 2
    Combo2.ColumnWidths = 0cm;2,503cm
    Combo2.BoundColumn = 2
    Combo2.LimitToList = True
    
    Combo3.RowSource = "SELECT FamilyHrID, MonthlyHours FROM FamilyHours_tbl"
    Combo3.ColumnCount = 2
    Combo3.ColumnWidths = 0cm;2,503cm
    Combo3.BoundColumn = 2
    Combo3.LimitToList = True
    
    
    Code:
    Private Sub Combo1_AfterUpdate()
    
        Me.Combo2 = Me.Combo1.Column(2)
        Me.Combo2.SetFocus
        Me.Combo2.Dropdown
        Me.Combo3 = Me.Combo1.Column(3)
        Me.Combo3.SetFocus
        Me.Combo3.Dropdown
        Me.Combo1.SetFocus
        
    End Sub


    [servicescovered] and [category] would be automatically populated with the values associated with that code

    1a = ITP, Academic Assessment
    1b = ITP, MER Completion - TANF
    1c = ITP, Career Training Plan
    1d = ITP, Counseling
    1e = ITP, Phone Call

    Theres Seven Cateogories and 25 ServicesCovered. I need for the users to type in a code and the combo boxes will just auto populate. Does that make sense??

  2. #2
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    ok got it all taken care of created a lookup table with the codes I needed then in the combob box that the users would put the codes in put this code in the After Update Event

    Code:
    Private Sub MERCodes_AfterUpdate()
    Me.Catagory_for_hours = Me.MERCodes.Column(2)
    Me.Catagory_for_hours.SetFocus
    Me.Catagory_for_hours.Dropdown
    Me.Services_Covered = Me.MERCodes.Column(3)
    Me.Services_Covered.SetFocus
    Me.Services_Covered.Dropdown
    Me.MERCodes.SetFocus
    
    
    
    End Sub
    worked like a charm

  3. #3
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388
    My question is why do you need three combo boxes when MERCodes combo box contains unique records e.g. 1a, 1b,1c,1d,1e? Now, if you have more than 1 Mercodes e.g. more than 1a codes with different values in Category and Services then you will need additional combo boxes.
    You can also populate text boxes using the same method for Category and Services.

  4. #4
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    no there will only be one 1a and one 1b etc. there wont be more then one of the same code

Posting Permissions

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