Results 1 to 3 of 3
  1. #1
    BatmanMR287 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    69

    Selecting two items for query from combo box

    I have a combo box that has three items in it. Name, ID_Num, Date


    I need to use ID_Num and Date to filter the results of query. I can use one or the other but not both. I have tried ListIndex but apperently am writing it wrong in the expression builder. [Forms]![TableName]![Combo0].
    [ListIndex]????????????
    I have tried =0, =1, =2 after the
    [ListIndex] but it doesn't work.
    How do I use two items from combobox in a query?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    A query cannot reference columns of combobox as parameters. This won't work in dynamic parameterized query.

    Base a form or report on the query and apply filter criteria to form or report. Build the filter criteria string with VBA. http://www.allenbrowne.com/ser-62.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    BatmanMR287 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    69
    Gottcha, I made two combo boxes and tied them together and set refresh off of the first one. Works fine.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Selecting items in multi-select list box
    By chronister in forum Access
    Replies: 3
    Last Post: 08-25-2013, 03:33 AM
  2. Selecting items and automating actions
    By dualvba in forum Access
    Replies: 3
    Last Post: 05-21-2012, 08:50 AM
  3. Selecting Items in a combo box
    By Ferdi in forum Programming
    Replies: 6
    Last Post: 03-15-2011, 09:12 AM
  4. Selecting multiple items from Dropdown
    By Kipster1203 in forum Forms
    Replies: 12
    Last Post: 06-07-2010, 09:20 AM
  5. Replies: 1
    Last Post: 11-11-2006, 08:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums