Hi All,
I have a report that gets duplicated 10 times with 12 fields on each report. So I don't have to edit 120 different fields is there a way that I can loop through the controls on each field/object and change the name and control source that I want - permanently... not just at run-time. Some-how it saves the report design?
The report is based on a cross-tab query
Example:
Field1 Field2 Field3 ...... Field12
SumField1 SumField2 SumField3 .... SumField12
CountField1 CountField2 CountField 3 .... CountField12
This then gets duplicated 10 times... as you can see it's for each 12 months in a year... each field value being a months data and 10 years of data.
n = 1, 2, 3, above
Fieldn controls source = a number value
SumFieldn control source = sum(Fieldn)
CountFieldn control source = count(Fieldn)
I know how to loop through controls on a report.. but that just gives you the changes at runtime.. I don't want the report to run slowly so I don't want to have to do it at runtime.
Does anyone know if this is possible or I am just asking too much?
I am used to creating Access Objects through the wizards but more and more I am using the VBA code... and I like it
Thanks,
EMG
I have a report that gets duplicated 10 times with 12 fields on each report. So I don't have to edit 120 different fields is there a way that I can loop through the controls on each field/object and change the name and control source that I want - permanently... not just at run-time. Some-how it saves the report design?
The report is based on a cross-tab query
Example:
Field1 Field2 Field3 ...... Field12
SumField1 SumField2 SumField3 .... SumField12
CountField1 CountField2 CountField 3 .... CountField12
This then gets duplicated 10 times... as you can see it's for each 12 months in a year... each field value being a months data and 10 years of data.
n = 1, 2, 3, above
Fieldn controls source = a number value
SumFieldn control source = sum(Fieldn)
CountFieldn control source = count(Fieldn)
I know how to loop through controls on a report.. but that just gives you the changes at runtime.. I don't want the report to run slowly so I don't want to have to do it at runtime.
Does anyone know if this is possible or I am just asking too much?
I am used to creating Access Objects through the wizards but more and more I am using the VBA code... and I like it
Thanks,
EMG