Share via

CrossTab query doesnt recognize expression

Anonymous
2022-08-23T14:39:53+00:00

I am trying to make a lead report using crosstab and have it by date range.. this >=[Forms]![frmExportFiles]![txtOrderDate] And <[Forms]![frmExportFiles]![txtOrderDate2]" Works in any other query i have with those same tables but when i do crosstab it says " The Microsoft Access database engine does not recognize '[Forms]![frmExportFiles]![txtOrderDate]' as a valid feild name or expression.

I have office 365 access installed locally and its Version 2207

Here is the SQL View.

TRANSFORM Count(vdlist_temp.lead_id) AS CountOflead_id

SELECT vicidial_lists.list_name

FROM vdlist_temp LEFT JOIN vicidial_lists ON vdlist_temp.list_id = vicidial_lists.list_id

WHERE (((vdlist_temp.PostDT)>=[Forms]![frmExportFiles]![txtOrderDate] And (vdlist_temp.PostDT)<[Forms]![frmExportFiles]![txtOrderDate2]))

GROUP BY vicidial_lists.list_name

PIVOT vdlist_temp.status;

Microsoft 365 and Office | Access | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2022-08-23T15:01:16+00:00

Hi,

In a crosstab query you have to declare the parameters as such, i.e. in design view of the query choose he tab Design - Parameters and enter the name (Forms!frmExportFiles!txtOrderDate etc.) and type of the parameter.

Servus

Karl

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful