• Wildcard in a parameter (2002)

    Author
    Topic
    #444978

    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.

    Viewing 0 reply threads
    Author
    Replies
    • #1077626

      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 * as parameter.

      • #1077679

        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.

        • #1077680

          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.

          • #1077681

            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.

    Viewing 0 reply threads
    Reply To: Wildcard in a parameter (2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: