Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    St. Marys, Ontario, Canada
    Posts
    270
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Wildcard in a parameter (2002)

    When I am designing a query or a report with a parameter, it is annoying to have to enter data to go between views. Is there a character you can put in the parameter when viewing the query or report that says select everything? I thought it was the *, but I tried that and it doesn't work.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Wildcard in a parameter (2002)

    One possibility is to change the criteria to

    [Enter Value] Or [Enter Value] Is Null

    where Enter Value is the text of the parameter. (Access will rearrange the criteria when you save, close and reopen the query; that is normal behavior). If you want to return all records, leave the parameter blank.

    Another possibility is to change the criteria to

    Like [Enter Value]

    where Enter Value is the text of the parameter. If you want to return all records, enter <code>*</code> as parameter.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    St. Marys, Ontario, Canada
    Posts
    270
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Wildcard in a parameter (2002)

    Either I didn't explain myself too well or I don't understand your reply. I want the parameter in the query and the resulting report. However, when making the report look nice you often flip back and forth between the design and print preview to see how you are doing. Each time you go to the print preview, you have to put something in the parameter. If it is a date field, you have to stick in a date. What I am looking for is a wildcard to put in any parameter that tells Access to show everything or to bypass the parameter so I don't have to waste so much time typing in jan 1 2008, for example.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Wildcard in a parameter (2002)

    That is not possible. You could do what I suggested, or temporarily remove the parameter from the query until you're done with the design.

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    St. Marys, Ontario, Canada
    Posts
    270
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Wildcard in a parameter (2002)

    Boy, that was quick. I just got back from a day of substitute teaching grade 6, so my brain is a bit fried. I tried it and it worked. Thanks.

Posting Permissions

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