Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Thanked 0 Times in 0 Posts

    Crosstab parameter query (Access 2003)

    I'm using the SQL below in a crosstab query. I want the user to be able to key in the site code using a parameter statement. When I run this it gives me an error of The Microsoft Jet database engine does not recognize [Enter Site Code] as a vaild field name or expression.
    The query looks the way I want but I need to add the parameter. This is where it fails. Thanks for the help....

    PARAMETERS [Site Code] Text ( 255 );
    TRANSFORM Count(NSReport.[Candidate Appt #]) AS [CountOfCandidate Appt #]
    SELECT NSReport.WSID, NSReport.[Site Code]
    FROM NSReport
    WHERE (((NSReport.[Site Code])=[Enter Site Code]))
    GROUP BY NSReport.WSID, NSReport.[Site Code]
    PIVOT NSReport.[Test Date];

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

    Re: Crosstab parameter query (Access 2003)

    Open the query in design view.
    Select Query | Parameters.
    Type [Enter Site Code] in the Parameter column (exactly as it appears in the Criteria line).
    Select the appropriate data type in the Data Type column.
    Click OK.
    Save the query design.

Posting Permissions

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