Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2003
    Posts
    225

    Unanswered: Filter by listbox

    I have a form which has a graph in it, which displays all data i have, but i want to filter it by lines that i choose from the listbox i have on the left of my form.

    ideally i would like to be able to switch on multiple that one line or select just the one.

    i also need to be able to print the graphs from the form

    form i am dealing with is called [form1]

    please help

    Andy
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2003
    Posts
    225
    anyone help please, I have looked into this quite a bit but am at a stand still now.



    Option Compare DatabasePrivate Sub List0_AfterUpdate()Dim varItem As VariantDim txtTemp As StringDim txtCriteria As StringtxtCriteria = "[CriteriaFieldName] = "For Each varItem In Me.List0.ItemsSelectedtxtTemp = txtTemp & txtCriteria & "'" & Me.List0.ItemData(varItem) & "'" & " Or "NextIf Len(txtTemp) > 0 ThentxtTemp = Left(txtTemp, Len(txtTemp) - 4)End IfMe.Text3 = txtTempEnd Sub

    I have added that to my listbox..

    not sure what this is referring too though?


    txtCriteria = "[CriteriaFieldName] = "


    also not sure what this bit means....


    Then pass the textbox itself to the form or report you wish to open by placing the following in the OnClick event of the button that opens the form or report:...Dim stDocName As StringDim stLinkCriteria As StringstDocName = "FormName"stLinkCriteria = Me![HiddenTextBoxName]DoCmd.OpenForm stDocName, , , stLinkCriteria...

  3. #3
    Join Date
    Mar 2003
    Posts
    225
    forgot to add latest updated database with code in it
    Attached Files Attached Files

  4. #4
    Join Date
    Mar 2003
    Posts
    225
    anyone please help me?

Posting Permissions

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