PC Review


Reply
Thread Tools Rate Thread

How do I change the body of an access report based on user selection?

 
 
Rob
Guest
Posts: n/a
 
      1st Sep 2006
O.k. Here's the deal. My office is swampped with memos going out and
most of them are standard except for the body of each memo. Im talking
over 100 memos that are almost identical excpet for the body. I have
set up the database so that the recipent title and address etc change
based on the users selection. For example if the user selects
recipient A from a list then A's address and information are
automatically filled in on the memo. My question is how do I do the
same thing with the body of the memo based on the type the user
selects. The memos are so similar (except for the body) ideally Id
like to have one "memo report" in access which changes the body based
on the users selction of memo type. I think this is to big to do using
a table and Id like a little more freedom to change text so I need to
do it in VB but dont really know how. I started a module and was
planning on using Select Case and just putting the text there but its
been a long time since Ive used that method. Any thoughts? Thanks in
advance!

Rob

 
Reply With Quote
 
 
 
 
KML
Guest
Posts: n/a
 
      1st Sep 2006

Rob,

In your current setup, are they using a form to select the recipients?
Is this how they will select the type of memo?

What format do they want the memos to be output in?
Word?
Access Report?

Rob wrote:
> O.k. Here's the deal. My office is swampped with memos going out and
> most of them are standard except for the body of each memo. Im talking
> over 100 memos that are almost identical excpet for the body. I have
> set up the database so that the recipent title and address etc change
> based on the users selection. For example if the user selects
> recipient A from a list then A's address and information are
> automatically filled in on the memo. My question is how do I do the
> same thing with the body of the memo based on the type the user
> selects. The memos are so similar (except for the body) ideally Id
> like to have one "memo report" in access which changes the body based
> on the users selction of memo type. I think this is to big to do using
> a table and Id like a little more freedom to change text so I need to
> do it in VB but dont really know how. I started a module and was
> planning on using Select Case and just putting the text there but its
> been a long time since Ive used that method. Any thoughts? Thanks in
> advance!
>
> Rob


 
Reply With Quote
 
Rob
Guest
Posts: n/a
 
      1st Sep 2006
Im using a form right now so they can select the recipient. They have
a drop down box to pick the office which focuses the second drop down
to show only the people in that office. They will be selecting the
type of memo from a form as well. I would like the output to an access
report as opposed to doing a mail merge.
KML wrote:
> Rob,
>
> In your current setup, are they using a form to select the recipients?
> Is this how they will select the type of memo?
>
> What format do they want the memos to be output in?
> Word?
> Access Report?
>
> Rob wrote:
> > O.k. Here's the deal. My office is swampped with memos going out and
> > most of them are standard except for the body of each memo. Im talking
> > over 100 memos that are almost identical excpet for the body. I have
> > set up the database so that the recipent title and address etc change
> > based on the users selection. For example if the user selects
> > recipient A from a list then A's address and information are
> > automatically filled in on the memo. My question is how do I do the
> > same thing with the body of the memo based on the type the user
> > selects. The memos are so similar (except for the body) ideally Id
> > like to have one "memo report" in access which changes the body based
> > on the users selction of memo type. I think this is to big to do using
> > a table and Id like a little more freedom to change text so I need to
> > do it in VB but dont really know how. I started a module and was
> > planning on using Select Case and just putting the text there but its
> > been a long time since Ive used that method. Any thoughts? Thanks in
> > advance!
> >
> > Rob


 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      1st Sep 2006
On 1 Sep 2006 07:44:16 -0700, "Rob" <(E-Mail Removed)> wrote:

>O.k. Here's the deal. My office is swampped with memos going out and
>most of them are standard except for the body of each memo. Im talking
>over 100 memos that are almost identical excpet for the body. I have
>set up the database so that the recipent title and address etc change
>based on the users selection. For example if the user selects
>recipient A from a list then A's address and information are
>automatically filled in on the memo. My question is how do I do the
>same thing with the body of the memo based on the type the user
>selects. The memos are so similar (except for the body) ideally Id
>like to have one "memo report" in access which changes the body based
>on the users selction of memo type. I think this is to big to do using
>a table and Id like a little more freedom to change text so I need to
>do it in VB but dont really know how. I started a module and was
>planning on using Select Case and just putting the text there but its
>been a long time since Ive used that method. Any thoughts? Thanks in
>advance!
>
>Rob


Would it make sense to have the body of the memo in a Memo field in
the table? Or will the user be typing the text of the memo (or part of
it perhaps) separately for each memo sent? If the latter, you could
launch the Report from a Form, and have a textbox on the Report
directly reference an unbound textbox on the Form where the user can
type the body.

John W. Vinson[MVP]
 
Reply With Quote
 
Rob
Guest
Posts: n/a
 
      1st Sep 2006
I actually tried that sucessfully but chose to type the code in VB
because I need to have calculated fields within the body. I actually
have it working in VB now I just need to know how to replace some of
the standard text with calculated fields within VB. I have the field
named in the query but Im not sure how to reference that field in VB.
The users (ideally) will not have to type anything for the body. They
will just select the office, recipient, and subject. The rest will be
filled in automatically.
John Vinson wrote:
> On 1 Sep 2006 07:44:16 -0700, "Rob" <(E-Mail Removed)> wrote:
>
> >O.k. Here's the deal. My office is swampped with memos going out and
> >most of them are standard except for the body of each memo. Im talking
> >over 100 memos that are almost identical excpet for the body. I have
> >set up the database so that the recipent title and address etc change
> >based on the users selection. For example if the user selects
> >recipient A from a list then A's address and information are
> >automatically filled in on the memo. My question is how do I do the
> >same thing with the body of the memo based on the type the user
> >selects. The memos are so similar (except for the body) ideally Id
> >like to have one "memo report" in access which changes the body based
> >on the users selction of memo type. I think this is to big to do using
> >a table and Id like a little more freedom to change text so I need to
> >do it in VB but dont really know how. I started a module and was
> >planning on using Select Case and just putting the text there but its
> >been a long time since Ive used that method. Any thoughts? Thanks in
> >advance!
> >
> >Rob

>
> Would it make sense to have the body of the memo in a Memo field in
> the table? Or will the user be typing the text of the memo (or part of
> it perhaps) separately for each memo sent? If the latter, you could
> launch the Report from a Form, and have a textbox on the Report
> directly reference an unbound textbox on the Form where the user can
> type the body.
>
> John W. Vinson[MVP]


 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      1st Sep 2006
On 1 Sep 2006 10:47:44 -0700, "Rob" <(E-Mail Removed)> wrote:

>I actually tried that sucessfully but chose to type the code in VB
>because I need to have calculated fields within the body. I actually
>have it working in VB now I just need to know how to replace some of
>the standard text with calculated fields within VB. I have the field
>named in the query but Im not sure how to reference that field in VB.
>The users (ideally) will not have to type anything for the body. They
>will just select the office, recipient, and subject. The rest will be
>filled in automatically.


I'd suggest using string variable; extract the boilerplate text from
the form control or from a Recordset, and use the Replace() function
to replace "placeholders". I have no clue what these memos or
calculations look like so I can't give precise examples, but if (say)
you have a boilerplate text with

....The interest rate for this loan will be <IntRate>, for a monthly
payment of $<Payment>...

you could use statements like

strMemoText = Replace(strMemoText, <IntRate>, Format(curRate,
Percent))

and so on.

John W. Vinson[MVP]


 
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
Change Form/Report Query Based on User Selection Wayne Microsoft Access Queries 3 8th Dec 2009 07:26 PM
Hide (visible/invisible) Columns in a report based on user selection Incolor Microsoft Access Form Coding 5 25th May 2006 10:12 PM
Report control values change based on drop-down selection from a f =?Utf-8?B?TW9uYS1BQkU=?= Microsoft Access VBA Modules 1 16th Nov 2005 03:20 PM
creating form with selections that change based on user's previous selection Robert Bogart Microsoft Access Database Table Design 1 15th Jun 2004 06:05 PM
create report with that groups based on user selection on form Heidi Microsoft Access Reports 1 7th Feb 2004 05:30 AM


Features
 

Advertising
 

Newsgroups
 


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