Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004

    Unanswered: Combo Box and Query Problem

    I have two combo boxs which are linked.

    Im trying to create a query based on the values of BOTH the combo boxs.

    I cannot get the query to run correctly if I use


    for the first combo box which record source is

    SELECT tblroute.ID, tblroute.route FROM tblroute.

    and column widths is


    I can get the query to work when the criteria is just the value of combo box 2 but just not Combo box 1

  2. #2
    Join Date
    Nov 2003
    Test the contents of ComboBox1. For example:

    MsgBox Me.ComboBox1

    Make sure you are receiving the value you expect.

  3. #3
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    You need to use a WHERE clause that will reference the values of both combo boxes to return the filtered result set. Since I have an idea what your code looks like , I will suggest something similar to the following:

    "SELECT *
    FROM tblRoute
    WHERE tblRoute.route_id = " & me.cmbRoute.value & " AND next_id_criteria = " & me.cmbOtherCombo.Value
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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