Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Evansville, Indiana, USA
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo box column (2007)

    I have a list box that i am filtering based on a selection from a combo box. Here is the sql for my list box:
    SELECT tblOrder.ID, tblOrder.[Product#], tblOrder.Color, tblOrder.Size, tblOrder.Qty, [lastname] & ", " & [firstname] AS Expr1
    FROM tblOrder
    WHERE ((([lastname] & ", " & [firstname])=Forms![frmOrder]![Combo23].[Column](3)));

    There is a problem with the syntax on the .column3 part. Can someone please take a look and see what I am doing wrong.
    Thanks,
    Bz

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo box column (2007)

    I don't think you can refer to a column in a list box or combo box in the criteria of a query.
    As a workaround, place a text box txtColumn3 on the form with control source

    =[Combo23].[Column](3)

    Set its Visible property to No.

    You can replace Forms![frmOrder]![Combo23].[Column](3) with Forms![frmOrder]!txtColumn3

  3. #3
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Evansville, Indiana, USA
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo box column (2007)

    I will do that, thanks.

  4. #4
    3 Star Lounger
    Join Date
    Sep 2001
    Location
    Stuck at work..., Missouri, USA
    Posts
    248
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo box column (2007)

    Hans,

    I came here to ask about this EXACT thing, but searched first as I like to do, and lo and behold you'd answered my question before I'd even answered it.

    You are getting too quick for me!

    Thanks,

    Morgan
    <font face="Comic Sans MS">Morgan Erickson</font face=comic>
    morgan.erickson@sprint.com
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>-From <img src=/S/flags/Colorado.gif border=0 alt=Colorado width=30 height=18> but living in <img src=/S/flags/Missouri.gif border=0 alt=Missouri width=30 height=18>...and working in Kansas.

Posting Permissions

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