Re: How to create a form based on a crosstab query? (I don't know how many columns there will be!)



On Apr 29, 2:33 am, Paul H <goo...@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I want to base a form on a crosstab query. The query shows statistics
for a user defined period. The column headings will look something
like this:

ClientID   Month01  Month02  Month03  etc..

So if the user selects 3 months in the criteria form, there will be 3
(month) column headings, if he selects 6 months, the will be 6
headings.

At the moment my solution is to somehow (i haven't figured out the VBA
yet) construct a form dynamically. Is there a simpler solution to this
problem?

Thanks,

Paul

assuming that there will be a maximum of 12 months
edit the query, hilight the column heading field, I assume it is
called 'months' and show its properties (right click the column)
in the 'column headings' property add
"month01", "month02", ..., "month12"

this will cause the query to already have 12 columns regardless of
which, if any, have data
.



Relevant Pages

  • Re: How to create a form based on a crosstab query? (I dont know how many columns there will be!)
    ... I have agreed with the client that he can view the results for a 6 ... The column headings will look something ... So if the user selects 3 months in the criteria form, ... At the moment my solution is to somehow (i haven't figured out the VBA ...
    (comp.databases.ms-access)
  • Re: Report based on crosstab query - problem printing
    ... make sure you have the query Properties dialog ... box open to enter the column headings. ... >>> Summary of attorneys' time by charge codes. ...
    (microsoft.public.access.reports)
  • Re: Report casues crash
    ... a crosstab query gets its column headings from one of the fields. ... That means Access has to run the query before it knows what the fields are. ... And since it needs to know what the fields are for you to design the report, ...
    (microsoft.public.access.reports)
  • Re: Crosstab Report
    ... Thanks for the information about dynamic column headings. ... some of the information you posted to the query and found it very useful. ... would like to choose the year the report starts. ... Then in the Open event of the report, generate the crosstab query ...
    (microsoft.public.access.reports)
  • Re: Crosstab Report
    ... MS Access MVP ... some of the information you posted to the query and found it very useful. ... would like to choose the year the report starts. ... Specify the column names in the query's Column Headings ...
    (microsoft.public.access.reports)