I am wanting to be able to enter the date ranges in a form named “CrossTabQueries” and then click a button to run a query and produce a report. “CrossTabQueries” is a tab page.
When I run the query (or try to save or close it), the parameter boxes for the Begin Date and End Date pop up. I do not want the parameter boxes. I want the info from the form used as the parameters.
When the boxes pop up they display (w/o the quotes) “frm_aaa_TabbedPagesPractice.tab_Pages.CrossTabQueries.txt_CrossTabBeginDate”
for the Begin Date and
“frm_aaa_TabbedPagesPractice.tab_Pages.CrossTabQueries.txt_CrossTabEndDate” for the End Date.
When I do enter dates into the parameter boxes, the query does pull and display the data as desired in a data sheet, but not a report. I do have a report right now that shows all records, not just those in the requested date range. If I can get the query to work, I’m confident I can get the report to display properly.
The record source for the report is: qry_Crosstab_ByDate_ByCategory.
The query is pulling info from only one table: tbl_DisruptionDetails.
How do I get the info from the form text boxes to be used and not the parameter pop up boxes?
Here is my SQL:
Thanks.
When I run the query (or try to save or close it), the parameter boxes for the Begin Date and End Date pop up. I do not want the parameter boxes. I want the info from the form used as the parameters.
When the boxes pop up they display (w/o the quotes) “frm_aaa_TabbedPagesPractice.tab_Pages.CrossTabQueries.txt_CrossTabBeginDate”
for the Begin Date and
“frm_aaa_TabbedPagesPractice.tab_Pages.CrossTabQueries.txt_CrossTabEndDate” for the End Date.
When I do enter dates into the parameter boxes, the query does pull and display the data as desired in a data sheet, but not a report. I do have a report right now that shows all records, not just those in the requested date range. If I can get the query to work, I’m confident I can get the report to display properly.
The record source for the report is: qry_Crosstab_ByDate_ByCategory.
The query is pulling info from only one table: tbl_DisruptionDetails.
How do I get the info from the form text boxes to be used and not the parameter pop up boxes?
Here is my SQL:
Code:
Parameters[frm_aaa_TabbedPagesPractice].[tab_Pages].[CrossTabQueries].[txt_CrossTabBeginDate] Date,
[frm_aaa_TabbedPagesPractice].[tab_Pages].[CrossTabQueries].[txt_CrossTabEndDate] Date;
TRANSFORM Count(tbl_DisruptionDetails.Category) AS CountOfCategory
SELECT tbl_DisruptionDetails.ReportDate, Count(tbl_DisruptionDetails.Category) AS [Total Of Category]
FROM tbl_DisruptionDetails
WHERE (((tbl_DisruptionDetails.ReportDate) Between [frm_aaa_TabbedPagesPractice].[tab_Pages].[CrossTabQueries].[txt_CrossTabBeginDate] And [frm_aaa_TabbedPagesPractice].[tab_Pages].[CrossTabQueries].[txt_CrossTabEndDate]))
GROUP BY tbl_DisruptionDetails.ReportDate
PIVOT tbl_DisruptionDetails.Category;
Thanks.