changing caption of report

  • Thread starter Thread starter Jean-Paul
  • Start date Start date
J

Jean-Paul

Hi,
I need to change the caption of my reports.
I want to add some variable to the caption so the command should be
something like:
"Invoice number_" & [Formulieren]![bedrijven]![weeknummer]

When I enter this in the report caption property the output finally is
"Invoice number_" & [Formulieren]![bedrijven]![weeknummer]
but should be
Invoice number_12

Any idea?
Thansk
 
I tried that... I get exactly what you wrote:
"Invoice number_" & [Formulieren]![bedrijven]![weeknummer]

instead of

invoice_12

sorry, thanks anyway
JP

Stefan said:
hi Jean-Paul,

Jean-Paul said:
Any idea?
You need an equal sign:

= "Invoice number_" & [Formulieren]![bedrijven]![weeknummer]


mfG
--> stefan <--
 
hi Jean-Paul,

Jean-Paul said:
I tried that... I get exactly what you wrote:
"Invoice number_" & [Formulieren]![bedrijven]![weeknummer]
My fault, you need to set it via VBA in the Load event:

Option Compare Database
Option Explicit

Private Sub Report_Load()

Me.Caption = "Invoice number_" & _
[Formulieren]![bedrijven]![weeknummer]

End Sub



mfG
--> stefan <--
 
Hi,
I need to change the caption of my reports.
I want to add some variable to the caption so the command should be
something like:
"Invoice number_" & [Formulieren]![bedrijven]![weeknummer]

When I enter this in the report caption property the output finally is
"Invoice number_" & [Formulieren]![bedrijven]![weeknummer]
but should be
Invoice number_12

Any idea?
Thansk

Whatever you write on the Report's Caption property line is take as
text, exactly as you write it.
You will have to use code.
The Report's Open event is too early, so as the caption is only useful
in Preview mode (which only fires during Preview), code the Report's
Activate event:

Me.Caption = "Invoice number_" & Formulieren]![bedrijven]![weeknummer]

Now I have no idea what Formulieren]![bedrijven]![weeknummer] means in
your language.
If that is your equivalent of Forms!FormName!ControlName that should
work BUT the form "bedrijven" must be open when the report is run.
 
Hi,
Thank you for your kind reply... alas, it doesn't work

The initial report caption is empty

Then I added:

Private Sub Report_Activate()
Me.Caption = "Invoice number_" & [Formulieren]![bedrijven]![weeknummer]
End Sub

the idea is that finally the report will be send trough email
I noticed the filename of the send report is what is in the caption
property.
Since, in my system, 10 different persons send reports, they all send
the same filename with different contents..
Do you know how to somve this problem?
Thanks
JP
Hi,
I need to change the caption of my reports.
I want to add some variable to the caption so the command should be
something like:
"Invoice number_" & [Formulieren]![bedrijven]![weeknummer]

When I enter this in the report caption property the output finally is
"Invoice number_" & [Formulieren]![bedrijven]![weeknummer]
but should be
Invoice number_12

Any idea?
Thansk

Whatever you write on the Report's Caption property line is take as
text, exactly as you write it.
You will have to use code.
The Report's Open event is too early, so as the caption is only useful
in Preview mode (which only fires during Preview), code the Report's
Activate event:

Me.Caption = "Invoice number_" & Formulieren]![bedrijven]![weeknummer]

Now I have no idea what Formulieren]![bedrijven]![weeknummer] means in
your language.
If that is your equivalent of Forms!FormName!ControlName that should
work BUT the form "bedrijven" must be open when the report is run.
 
Back
Top