A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Change Caption in Report



 
 
Thread Tools Display Modes
  #1  
Old April 22nd, 2010, 01:25 AM posted to microsoft.public.access.reports
neesie214
external usenet poster
 
Posts: 4
Default Change Caption in Report

Hi all,

I am trying to set up macros based on a huge amount of reports to
automatically print the reports all at once. However, I would like to change
the caption setting so that I don't have to keep changing the file name each
time. Is there a way to do this? I am new to Access so I'm not sure how to
set this up.

For example, one report is called "rptCountrybySalesParent" and I would like
each file to print out like "FrabySalesParent," "ItabySalesParent,
"ChnbySalesParent," etc. I have the where conditions figured out, but the
captions are puzzling me.

Thanks! Any help you can give would be greatly appreciated.
  #2  
Old April 22nd, 2010, 09:10 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Change Caption in Report

neesie214 wrote:
I am trying to set up macros based on a huge amount of reports to
automatically print the reports all at once. However, I would like to change
the caption setting so that I don't have to keep changing the file name each
time. Is there a way to do this? I am new to Access so I'm not sure how to
set this up.

For example, one report is called "rptCountrybySalesParent" and I would like
each file to print out like "FrabySalesParent," "ItabySalesParent,
"ChnbySalesParent," etc. I have the where conditions figured out, but the
captions are puzzling me.



The report's caption should be changed by the report itself.
This is not very complicated because you can use the
OpenReport method's OpenArgs argument to pass the caption
text to the report when it is opened:

DoCmd.OpenReport "report name", view, _
WhereCondition:= "filter conditions string", _
OpenArgs:= "the desired caption"

Then the report's Open event can set the Caption:
Me.Caption = Me.OpenArgs

--
Marsh
MVP [MS Access]
  #3  
Old April 22nd, 2010, 10:36 PM posted to microsoft.public.access.reports
neesie214
external usenet poster
 
Posts: 4
Default Change Caption in Report

Thanks for the help, but I'm still lost. Any change you could walk me through
all that step by step?

"Marshall Barton" wrote:

neesie214 wrote:
I am trying to set up macros based on a huge amount of reports to
automatically print the reports all at once. However, I would like to change
the caption setting so that I don't have to keep changing the file name each
time. Is there a way to do this? I am new to Access so I'm not sure how to
set this up.

For example, one report is called "rptCountrybySalesParent" and I would like
each file to print out like "FrabySalesParent," "ItabySalesParent,
"ChnbySalesParent," etc. I have the where conditions figured out, but the
captions are puzzling me.



The report's caption should be changed by the report itself.
This is not very complicated because you can use the
OpenReport method's OpenArgs argument to pass the caption
text to the report when it is opened:

DoCmd.OpenReport "report name", view, _
WhereCondition:= "filter conditions string", _
OpenArgs:= "the desired caption"

Then the report's Open event can set the Caption:
Me.Caption = Me.OpenArgs

--
Marsh
MVP [MS Access]
.

  #4  
Old April 23rd, 2010, 04:09 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Change Caption in Report

I don't use macros so I was leaving it to you to adjust the
form macro that opens the report. Just use the OpenReport
action's OpenArgs argument to pass whatever caption string
you want to the report.

Then create and use a macro for the report's Open event to
set the caption.

I find it very difficult to describe a macro in a text
message, especially since I have not written a macro in more
than 10 years. I use VBA code to communicate because it is
pretty unambiguous and, except for specific names and values
you are using, can mostly be Copy/Pasted for you to use.

If you were using VBA code to do whatever it is you are
tring to do, then you could Copy/Paste what you have so I
could try to pick up on some of the details you left out of
your text message.
--
Marsh
MVP [MS Access]


neesie214 wrote:
Thanks for the help, but I'm still lost. Any change you could walk me through
all that step by step?

"Marshall Barton" wrote:
neesie214 wrote:
I am trying to set up macros based on a huge amount of reports to
automatically print the reports all at once. However, I would like to change
the caption setting so that I don't have to keep changing the file name each
time. Is there a way to do this? I am new to Access so I'm not sure how to
set this up.

For example, one report is called "rptCountrybySalesParent" and I would like
each file to print out like "FrabySalesParent," "ItabySalesParent,
"ChnbySalesParent," etc. I have the where conditions figured out, but the
captions are puzzling me.


The report's caption should be changed by the report itself.
This is not very complicated because you can use the
OpenReport method's OpenArgs argument to pass the caption
text to the report when it is opened:

DoCmd.OpenReport "report name", view, _
WhereCondition:= "filter conditions string", _
OpenArgs:= "the desired caption"

Then the report's Open event can set the Caption:
Me.Caption = Me.OpenArgs

  #5  
Old April 23rd, 2010, 10:04 PM posted to microsoft.public.access.reports
neesie214
external usenet poster
 
Posts: 4
Default Change Caption in Report

Thank you for the help - after some further testing, I figured out how to
change the caption as part of the macros I am working on. Thanks!

"Marshall Barton" wrote:

I don't use macros so I was leaving it to you to adjust the
form macro that opens the report. Just use the OpenReport
action's OpenArgs argument to pass whatever caption string
you want to the report.

Then create and use a macro for the report's Open event to
set the caption.

I find it very difficult to describe a macro in a text
message, especially since I have not written a macro in more
than 10 years. I use VBA code to communicate because it is
pretty unambiguous and, except for specific names and values
you are using, can mostly be Copy/Pasted for you to use.

If you were using VBA code to do whatever it is you are
tring to do, then you could Copy/Paste what you have so I
could try to pick up on some of the details you left out of
your text message.
--
Marsh
MVP [MS Access]


neesie214 wrote:
Thanks for the help, but I'm still lost. Any change you could walk me through
all that step by step?

"Marshall Barton" wrote:
neesie214 wrote:
I am trying to set up macros based on a huge amount of reports to
automatically print the reports all at once. However, I would like to change
the caption setting so that I don't have to keep changing the file name each
time. Is there a way to do this? I am new to Access so I'm not sure how to
set this up.

For example, one report is called "rptCountrybySalesParent" and I would like
each file to print out like "FrabySalesParent," "ItabySalesParent,
"ChnbySalesParent," etc. I have the where conditions figured out, but the
captions are puzzling me.


The report's caption should be changed by the report itself.
This is not very complicated because you can use the
OpenReport method's OpenArgs argument to pass the caption
text to the report when it is opened:

DoCmd.OpenReport "report name", view, _
WhereCondition:= "filter conditions string", _
OpenArgs:= "the desired caption"

Then the report's Open event can set the Caption:
Me.Caption = Me.OpenArgs

.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.