Cross Tab query filtered by a value on a form RRS feed

  • Question

  • I have a report that is based on a cross tab query linked to a regular query I want to filter the report by using a value on a form that is on display and has a button to call the report.  I can manually filter the report by entering the value that i type but can not get the the report to run by referring to the form filed.  the error that I get is 

    The Microsoft Access database engine does not recognize as a valid field name or expression. (Error 3070)<name style="box-sizing:inherit;outline-color:inherit;"></name>

    Wednesday, July 1, 2020 3:18 PM

All replies

  • Declare the parameter in the crosstab query, e.g. where the parameter is of long integer data type:

    PARAMETERS Forms!NameOfForm!NameOfControl LONG;
    TRANSFORM etc…
    SELECT etc…
    FROM etc…
    WHERE NameOfColumn = Forms!NameOfForm!NameOfControl
    GROUP BY etc…
    PIVOT etc…

    Ken Sheridan, Stafford, England

    Wednesday, July 1, 2020 5:03 PM