FORM - Cascading Combo Boxes from a linked list in SharePoint

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jerelp
    New Member
    • Mar 2010
    • 16

    #1

    FORM - Cascading Combo Boxes from a linked list in SharePoint

    I've never used a linked list in sharepoint and I've never created cascading combox boxes. I don't know if it is possible to make a SQL statement from the linked list if so how do you do it?

    Linked list name is Systems Activity

    I need to create combo box that drills down to another combo box

    First combobox - Category
    Second Combobox - SubCat

    I've made the Category combobox bound control source to [Category] and a Row source with a value list:
    Development
    Out of Office
    Support

    the SubCat combobox the control source is unbound and the row source is also unbound which gets it source from VBA

    if it were to drill down it would be
    Out of Office:
    sick
    vacation
    leave
    personal
    Development:
    project
    database

    The code in vba is:
    Code:
    Private Sub Category_AfterUpdate()
    
    Dim filter As String
    
    filter = Category.Value
    
    SubCat.RowSource = "Select [Systems Activity].[SubCat] From [Systems Activity] WHERE [Systems Activity].[Category] = " & filter & " Order By [Systems Activity].[SubCat];"
    
    SubCat.Requery
    
    End Sub
    When I do use this i get a
    Syntax Error(missing operator) in query expression '[Systems Activity].[Category] = Development'.

    'Development' is the value in category combobox


    PLEASE HELP!!!!!!!
Working...