Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2004
    Posts
    3

    Question Unanswered: Combo Boxes on a Form for Filtering

    Hi, can someone please help!

    I am having problems with a form that has two combo boxes. One filters on a field called "Group" and the second filters on a field called "Vendors". I want this form to allow someone to make their selections then hit a command button which will open another form with the filtered data. This form is a continous form that uses another query as the record source. At the bottom is a subform.

    At this point, my two combo boxes are made but do nothing when an item is selected from the drop-down list. Usually when you click on an item it gets highlighted and appears in the combo box.

    Another thing, I created the command button to open the other form using the Command Button Wizard. It allowed me to tell what items I would like to have the form filtered on. From there I selected which combo box matches up to which field. This was very easy but...

    What is going wrong?

  2. #2
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    183
    Paste your code
    Skharva

  3. #3
    Join Date
    Apr 2004
    Posts
    3

    Question Here is the code

    This is the code for the command button to open my other form:
    **I don't have any codes for the combo boxes. Should there be a code for the "On Click" option.

    Private Sub cmd_ItemSelection_Click()
    On Error GoTo Err_cmd_ItemSelection_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frm_InventoryHealth_UpdateProdAvail"

    stLinkCriteria = "[Group]=" & "'" & Me![cbo_Group] & "'"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_cmd_ItemSelection_Click:
    Exit Sub

    Err_cmd_ItemSelection_Click:
    MsgBox Err.Description
    Resume Exit_cmd_ItemSelection_Click

    End Sub


    Whatever help you can give me would be great!

  4. #4
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    183
    You need to have vendor in your code in order to filter out form based on two combo box. Right now you are only filtering out by "group" If you can attached your db i will try to fix it
    Skharva

  5. #5
    Join Date
    Apr 2004
    Posts
    3

    Smile Combo Boxes

    I don't see how to attach a file to this message. Do you have an email address that I can send this file to?

    Thanks so much!

  6. #6
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    183
    Send it to Skharva@yahoo.com
    Skharva

Posting Permissions

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