Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2014
    Posts
    11

    Unanswered: Cascading combo boxes

    I'm using three combo boxes - The second (cbosubSkillList) is limited by value selected in the first (cboSkillList). The third (cboSubSkillList2) to be limited by value selected in the second. The third will not populate - If I comment out the code, It WILL populate will all values in the table, but will not populate with code active. All names, properties, etc. with combo boxes, tables, field names parallel - Why am I not populating the third box?

    [Code]
    Private Sub cboSkillList_AfterUpdate()
    With Me![cboSubSkillList]
    If IsNull(Me!cboSkillList) Then
    .RowSource = ""
    Else
    .RowSource = "SELECT [SubSkill] " & _
    "FROM SubSkillList " & _
    "WHERE [SkillID]=" & Me!cboSkillList
    End If
    Call .Requery
    End With
    End Sub
    *****************************
    Private Sub cbosubSkillList_AfterUpdate()
    With Me![cboSubSkillList2]
    If IsNull(Me!cboSubSkillList2) Then
    .RowSource = ""
    Else
    .RowSource = "SELECT [SubSkill2] " & _
    "FROM SubSkillList2 " & _
    "WHERE [subSkillID]=" & Me!cboSubSkillList
    End If
    Call .Requery
    End With
    End Sub

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    code looks Ok
    soi it may well be how your columns are defined, what the data is


    what happens if you put a breakpoint on the code and step through identifying what actually happens as opposed to what you think is happening
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    How is the [subSkillID] Field defined; i.e. at the Table-Level, what is the DataType of [subSkillID]? If it is defined as Text, the correct syntax would be

    WHERE [subSkillID]='" & Me!cboSubSkillList & "'"

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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