[AccessD] Change Reports Caption From Code

Bob Heygood bheygood at abestsystems.com
Tue Jul 12 12:59:47 CDT 2005


Thanks to all who responded. The on open event is what I used.
I thot of it earlier, but thot twice about using a global variable.
Not to start another rant/discussion, but I feel this is a good example a
good use of a global.

I am creating 79 PDFs from code, which involves opening a report. The neat
news is that the reports caption property is what Acrobat uses for the
resulting file name. Hence my need to change the caption each time I
programmically open the report.


thanks again.

bob

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of A.D.Tejpal
Sent: Monday, July 11, 2005 11:03 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Change Reports Caption From Code


Bob,

    Sample code as given below, in report's open event, should set its
caption as per text box named TxtCaption (on form named F_Test).

    Private Sub Report_Open(Cancel As Integer)
        Me.Caption = Forms("F_Test")("TxtCaption")
    End Sub

Best wishes,
A.D.Tejpal
--------------

  ----- Original Message -----
  From: Bob Heygood
  To: Access Developers discussion and problem solving
  Sent: Monday, July 11, 2005 02:21
  Subject: [AccessD] Change Reports Caption From Code


  Hello to the list,

  I want to change the Caption property of a report from a form via code.
Can anyone help me?

  thanks,,

  bob
--
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