Results 1 to 4 of 4
  1. #1
    Ranger7913 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Oct 2014
    Posts
    18

    Query Criteria Expression


    I am looking for an example of a criteria expression. I have a query set up now that asks for a "Location" and "Start Date", "End Date". I would like to have the query return all "Locations" if when prompted to enter a location, I leave it blank. I know I could go into the query and remove the Location criteria when I want to return all records but is there an expression I can use to allow me to return all records or specific records based on a criteria statement? Thanks for any help.

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Enter this is the criteria for Location:
    Code:
    Like [Enter Location] & "*"

  3. #3
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Enter this is the criteria for Location:
    Code:
    Like [Enter Location] & "*"
    Just note that it will return all entries that begin with whatever you enter in (or everything if you leave it blank).

  4. #4
    Ranger7913 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Oct 2014
    Posts
    18
    Thanks. That worked perfectly.

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

Similar Threads

  1. Replies: 1
    Last Post: 11-13-2014, 11:34 PM
  2. Replies: 2
    Last Post: 06-22-2014, 09:49 PM
  3. Replies: 2
    Last Post: 12-21-2013, 11:37 AM
  4. Replies: 4
    Last Post: 05-17-2013, 04:00 PM
  5. Replies: 1
    Last Post: 03-23-2010, 04:01 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