Fresher VBA standard here so be gentle.
How could I generate a table on the fly using VBA?
At the moment I have a cross tab query that works a treat but I was experimenting and wanted to try something different.
The cross tab has columns for days 0,1,2,3 up to 12 and 'date'. The user can choose start/end dates. Here is the cross tab to illustrate
I wanted to store the results of the query in a 'table' so I can comment on the report and store those comments in the table as well. This means I can the report can be given a filename and be recovered by the user
How could I generate a table on the fly using VBA?
At the moment I have a cross tab query that works a treat but I was experimenting and wanted to try something different.
The cross tab has columns for days 0,1,2,3 up to 12 and 'date'. The user can choose start/end dates. Here is the cross tab to illustrate
Code:
PARAMETERS [Forms]![frmRptDialogSingle]![begdate] DateTime, [Forms]![frmRptDialogSingle]![enddate] DateTime;
TRANSFORM Count(qry_cardiology1.EpisodeID) AS CountOfEpisodeID
SELECT Format([RequestDatetime],"yyyy/mmm") AS [Date]
FROM qry_cardiology1
WHERE (((qry_cardiology1.RequestDatetime) Between [Forms]![frmRptDialogSingle]![begdate] And [Forms]![frmRptDialogSingle]![enddate]))
GROUP BY Format([RequestDatetime],"yyyy/mmm"), Format([RequestDatetime],"yyyy/mm")
ORDER BY Format([RequestDatetime],"yyyy/mm")
PIVOT qry_cardiology1.Days In (0,1,2,3,4,5,6,7,8,9,10,11,12);
I wanted to store the results of the query in a 'table' so I can comment on the report and store those comments in the table as well. This means I can the report can be given a filename and be recovered by the user