Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Jan 2002
    Houston, Texas, USA
    Thanked 0 Times in 0 Posts

    Parameter Query (Access 2003)

    I have two parameters in my query. One parameter says [Enter Date]. The other one says [Enter Restaurant]. I need a parameter that will let the user just press enter to return all records if they don't need to filter out a given record. (i.e., They enter 6/11/07 for the date and they don't want to specify the restaurant. Say I have 2 restaurants for June 11--one's Kiran's and the other is Maxim's. If they type in Kiran's, it returns all the Kiran's for June 11, 2007. If they're not sure, or if they want all the entries for 6/11/07, what do I type in my restaurant parameter so that if they press ENTER, it'll return everything for 6/11/07? (I've done this before, but I forgot how. It was something with LIKE "*" [Enter Restaurant], but I've forgotten what it was.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Parameter Query (Access 2003)

    Change the criteria for the date field to

    [Enter Date] Or [Enter Date] Is Null

    Change the criteria for the restaurant field to

    [Enter Restaurant] Or [Enter Restaurant] Is Null

    Note: when you save, close and reopen the query, Access will have rearranged the criteria across multiple lines. This is normal behavior.

Posting Permissions

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