Crosstab Query With Parameters

geekette

Board Regular
Joined
Sep 12, 2006
Messages
120
Hi,

I have a crosstab query that is linked to a select query. The select query contains parameters that are linked to a form where a user can enter dates.

When I try to run the crosstab query I get an error message "Microsoft Access does not recognise.... (the name of the date field on my form). I've tried resolving this by entering the name of the form field into the queries parameter.

But I now get a different message saying "Incorrect bracketing". I've entered the full name of the form and field [Forms]![frm_ResourcePlanner]![Report_StartDate] and am not sure why I am getting this message?

The SQL for my Crosstab query is below:

PARAMETERS [Forms]![frm_ResourcePlanner]![[Report_StartDate] ] DateTime;
TRANSFORM Sum(qry_Availability_Centrac_P2.Number) AS SumOfNumber
SELECT qry_Availability_Centrac_P2.Date, qry_Availability_Centrac_P2.Report_Name, qry_Availability_Centrac_P2.Code, Sum(qry_Availability_Centrac_P2.Number) AS [Total Of Number]
FROM qry_Availability_Centrac_P2
GROUP BY qry_Availability_Centrac_P2.Date, qry_Availability_Centrac_P2.Report_Name, qry_Availability_Centrac_P2.Code
PIVOT qry_Availability_Centrac_P2.Interval_Start;

Any help would be greatly received :O)
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
It looks like you have 2 sets of brackets around Report_StartDate.

[Forms]![frm_ResourcePlanner]![[Report_StartDate] ]

Should be: [Forms]![frm_ResourcePlanner]![Report_StartDate]
 
Upvote 0
Hi - thanks for your reply - it was a typo I'd made when posting my question. Even with the correct bracketing it still gives me the same error?
 
Upvote 0

Forum statistics

Threads
1,222,437
Messages
6,166,026
Members
452,008
Latest member
Customlogoflipflops

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top