PC Review


Reply
Thread Tools Rate Thread

Change Caption in Report

 
 
neesie214
Guest
Posts: n/a
 
      22nd Apr 2010
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.
 
Reply With Quote
 
 
 
 
neesie214
Guest
Posts: n/a
 
      22nd Apr 2010
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]
> .
>

 
Reply With Quote
 
 
 
 
neesie214
Guest
Posts: n/a
 
      23rd Apr 2010
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

> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change default caption color in References/Insert Caption? Nick Piazza Microsoft Word Document Management 5 15th Aug 2012 10:07 AM
can i able to change the voting caption "VOTE" to custom caption? Balan Microsoft Outlook 1 3rd Dec 2008 10:47 PM
How to reference win.caption, when caption changes Paul987 Microsoft Excel Programming 3 7th Apr 2006 05:09 PM
Created custom caption bar - need help with caption button positio =?Utf-8?B?TWFyaXVzSQ==?= Microsoft Dot NET Framework Forms 0 28th Jun 2005 08:21 AM
Caption in panel bar of Win 2000 even if No caption has been set for our windows Form =?Utf-8?B?SGVtYW50?= Microsoft Dot NET Framework Forms 1 6th Mar 2004 11:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:41 AM.