[AccessD] Use of a Variable for Setting Report Properties

Brad Marks BradM at blackforestltd.com
Fri Nov 15 19:44:47 CST 2013


Doug, Gustav, Jim,

Thanks for your help and advice, I really appreciate the assistance.

My code is now working nicely and I am all smiles.

Brad 




-----Original Message-----
From: accessd-bounces at databaseadvisors.com on behalf of Doug Steele
Sent: Fri 11/15/2013 4:06 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Use of a Variable for Setting Report Properties
 
Reports(MyVariable).Caption

that should do it.  Just tested it here OK

Doug


On Fri, Nov 15, 2013 at 1:44 PM, Brad Marks <BradM at blackforestltd.com>wrote:

> 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
>
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
This message was scanned by ESVA and is believed to be clean.
Click here to report this message as spam. 
http://h0stname/cgi-bin/learn-msg.cgi?id=2E5CE28AEB.B6BC4





More information about the AccessD mailing list