(Msg. 1) Posted: Thu Jul 24, 2008 11:52 am
Post subject: Crosstab queries and reports Add to elertz Archived from groups: microsoft>public>access>reports (more info?)
Hi,
I have the crosstab working by putting parameters in the crosstab -
Beginning Date and Ending Date.
It works fine when I run the query. However, I have a problem in creating a
report based on my crosstab query. There are no fields for me to choose from
the wizard.
(Msg. 2) Posted: Fri Jul 25, 2008 3:00 am
Post subject: Re: Crosstab queries and reports Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Are the dates the column headings? If so, the actual field names generated
in the query will change depending on the parameters you enter. And since
the field names change, any report you design now won't have the right field
names for the future.
If you can't do that, other options include using the Column Headings
property of the query so all the field names are generated for the report
regardless of the parameters. Specifying the Column Headings will solve the
problem of making the field names available quickly in design view as well.
Details:
http://allenbrowne.com/ser-67.html#ColHead
But that may generate too many columns. You may therefore need to use VBA
code in the report's Open event to determine the field names, assign its
RecordSource, assign the ControlSource of the controls to the needed field
names, and set the captions over the columns. This will require an
understanding of VBA and SQL, so check out if Duane's solution is suitable
first.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Chi" <Chi DeleteThis @discussions.microsoft.com> wrote in message
news:69DC4CD5-0A6E-4B28-8751-A9ABF31DEB4E@microsoft.com...
>
> I have the crosstab working by putting parameters in the crosstab -
> Beginning Date and Ending Date.
>
> It works fine when I run the query. However, I have a problem in creating
> a report based on my crosstab query. There are no fields for me to
> choose from the wizard
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum