Results 1 to 2 of 2
  1. #1
    Liam87 is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2012
    Posts
    10

    Multiple criteria for a query

    I was wondering if anyone would have an idea to list values in a form which set values for criteria in a query.


    I think you would use In(X, Y, Z) in the criteria field, however I want to use a form so a user can enter in a set of values they want to restrict the query too.

    As an example you have a list of Cars and Occurences in your 5km raidus, the user can enter into the form Car1, Car2, Car3 and the query will give the occurences of those 3 cars.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    I think you will be building a form, and on the form you may have some controls. Your user could select 1 or more options from that control.(could be a multiselect list box) Once the user has made all of his/her selections, you would use vba and the selections that were made to create a query. Then perhaps on another control(button) in the Click event, you would execute the query you built and display the resulting info on a form.

    Just one scenario, if I've understood your question correctly. I don't know your experience level so can't be more specific.

    There are a number of examples listbox selections and mixing SQL and vba at
    http://www.fontstuff.com/access/acctut11.htm

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

Similar Threads

  1. Multiple criteria in a SQL query
    By Huddle in forum Queries
    Replies: 2
    Last Post: 02-29-2012, 03:32 PM
  2. Unmatched query with multiple criteria
    By brighteyes in forum Access
    Replies: 0
    Last Post: 10-26-2011, 06:37 AM
  3. Multiple criteria query
    By jwb257 in forum Queries
    Replies: 6
    Last Post: 10-21-2011, 02:29 PM
  4. Replies: 1
    Last Post: 07-13-2011, 11:00 AM
  5. Multiple criteria query
    By DJ-Specter in forum Queries
    Replies: 1
    Last Post: 09-23-2009, 04:47 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