Results 1 to 2 of 2
  1. #1
    blacksaibot is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    34

    Question Query criteria retrieved from a Form combobox?

    Right now on my form I have a comobox with 3 options.



    The third option is an "all of the above" case.

    The query takes the selection from the form combobox like so:

    [forms]![formname]![comboboxname]

    The problem is: I can't figure out how to tell it to take both option1 and option2 as the criteria when option3 is selected in the combobox.

    My intial thought was to put an asterisk (*) because I remember back in my SQL days * meant "everything" but that won't work. any help? Thanks!



    EDIT: Also, how can I do the same thing but with a listbox that has a multiselect??
    Last edited by blacksaibot; 01-27-2010 at 08:05 AM. Reason: Additional Question.

  2. #2
    blacksaibot is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    34
    I got it........

    In SQL view...

    Where fieldname=([forms]![formname]![comboboxname]) or [forms]![formname]![comboboxname]="all of the above")


    Anyone know how to solve the multiselect in combobox issue?
    Something tells me VBA might be involved, not 100% sure how I'd pull it off without it. VBA is not my strong point. I guess looping through the items that are selected???

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

Similar Threads

  1. Query criteria in a form
    By sefiroths in forum Queries
    Replies: 1
    Last Post: 12-23-2009, 05:15 AM
  2. Replies: 0
    Last Post: 12-16-2009, 01:14 PM
  3. Criteria from Combobox dont work.
    By Ryan in forum Queries
    Replies: 3
    Last Post: 08-31-2009, 07:09 AM
  4. Replies: 3
    Last Post: 07-30-2009, 07:12 AM
  5. Replies: 0
    Last Post: 02-09-2007, 09:20 AM

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