D
DZ
I successfully used a CrossTab query as recordsource for a form.
The Crosstab query groups by month. There are multiple years and as data is
added the number of fields representing Year/Months grows.
The form had filter options for Year and Name. When the user selects a name
and year and clicks the Filter button cmdFilter, my code dynamically set the
control sources of the month text boxes that display data for every month of
the selected year.
Now i need to create a report with the same layout and recordsource, so I
grouped by year and then ported the code to the report format event and
changed the comboYear reference to me.Year.
I am getting an error message that ControlSource can't be set in
PrintPreview etc.
Does that means that its impossible to set the ControlSource of the month
text boxes in a report or is there another way of setting the controlSource
with code that I a,m not aware of.
or
Do i need to take a different approach entirely and dynamically create a
query somehow.
I'm trying to come up with an approach to this.
Any ideas welcome
DZ
The Crosstab query groups by month. There are multiple years and as data is
added the number of fields representing Year/Months grows.
The form had filter options for Year and Name. When the user selects a name
and year and clicks the Filter button cmdFilter, my code dynamically set the
control sources of the month text boxes that display data for every month of
the selected year.
Now i need to create a report with the same layout and recordsource, so I
grouped by year and then ported the code to the report format event and
changed the comboYear reference to me.Year.
I am getting an error message that ControlSource can't be set in
PrintPreview etc.
Does that means that its impossible to set the ControlSource of the month
text boxes in a report or is there another way of setting the controlSource
with code that I a,m not aware of.
or
Do i need to take a different approach entirely and dynamically create a
query somehow.
I'm trying to come up with an approach to this.
Any ideas welcome
DZ