[AccessD] Use of a Variable for Setting Report Properties

Jim Lawrence accessd at shaw.ca
Fri Nov 15 17:29:28 CST 2013


Hi Brad:

You can manage everything through the report's OnOpen event. You can either embed the code in the report or call a public function from the event. The control can just be managed through an incrementing variable.

Jim 

----- Original Message -----
From: "Brad Marks" <BradM at blackforestltd.com>
To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com>
Sent: Friday, November 15, 2013 1:44:27 PM
Subject: [AccessD] Use of a Variable for Setting Report Properties

All,

I have a Four-Week "Calendar" report that has 20 Sub-reports (one for
each "work day" in the 4-week period) 

This application has a little VBA code that changes some of the
properties on each of these 20 reports.

This is done with one line of code for each report like this -

Reports.Report1.Caption = Str_Test1

Reports.Report2.Caption = Str_Test2

Reports.Report3.Caption = Str_Test3 ...



Instead of having one line of code for each report, I would like to set
up a loop to handle this processing.

To do this, I need to somehow use a variable something like...

Reports. & MyVariable & .Caption = Str_Test1

Is this possible?
Thanks,
Brad

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list