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  

Can you add a field in the body of a text box



 
 
Thread Tools Display Modes
  #1  
Old December 11th, 2009, 08:20 PM posted to microsoft.public.access.reports
FergusonH
external usenet poster
 
Posts: 13
Default Can you add a field in the body of a text box

I'm trying to use a REPORT in Access to generate a letter. Can I have a
field display in the body of the text box? For ex: if my field is [total]
can I have something like "Our records indicate your total purchases are
[total] and your total expenses are..."

thanks!
  #2  
Old December 11th, 2009, 08:45 PM posted to microsoft.public.access.reports
Steve[_77_]
external usenet poster
 
Posts: 1,017
Default Can you add a field in the body of a text box

The answer to your question is NO! However you can do what you want by
storing phrase in a table:
TblPhrase
PhraseID
Phrase

Where the first Phrase record is "Our records indicate your total purchases
are" and the second Phrase record is "and your total expenses are...". Then
you can do what you want with: No quotes in the actual records!
Sentence = Dlookup("[Phrase]","TblPhrase","[PhraseID = 1]") & " " &
Me![Total] & " " & Dlookup("[Phrase]","TblPhrase","[PhraseID = 2]")

Steve



"FergusonH" wrote in message
...
I'm trying to use a REPORT in Access to generate a letter. Can I have a
field display in the body of the text box? For ex: if my field is [total]
can I have something like "Our records indicate your total purchases are
[total] and your total expenses are..."

thanks!



  #3  
Old December 11th, 2009, 10:09 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Can you add a field in the body of a text box

FergusonH wrote:

I'm trying to use a REPORT in Access to generate a letter. Can I have a
field display in the body of the text box? For ex: if my field is [total]
can I have something like "Our records indicate your total purchases are
[total] and your total expenses are..."



Not sure what you are trying to accomplish, but if the
report will always have the same text in the text box, try
using an expression in the text box's control source:

="Our records indicate your total purchases are " &
[total] & " and your total expenses are..."

--
Marsh
MVP [MS Access]
  #4  
Old December 11th, 2009, 10:25 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Can you add a field in the body of a text box

If the Total field is in the report's record source, you can create a text
box with a control source like:
="Our records indicate your total purchases are " & [total] & " and your
total expenses are..."

You may want to format the field like:
="Our records indicate your total purchases are " &
Format([total],"Currency") & " and your total expenses are..."

--
Duane Hookom
Microsoft Access MVP


"FergusonH" wrote:

I'm trying to use a REPORT in Access to generate a letter. Can I have a
field display in the body of the text box? For ex: if my field is [total]
can I have something like "Our records indicate your total purchases are
[total] and your total expenses are..."

thanks!

  #5  
Old December 12th, 2009, 01:00 AM posted to microsoft.public.access.reports
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Can you add a field in the body of a text box

If you are working in a report in design view, you can add a text box
(unbound), then put the following in the ControlSource property of that
textbox:

="Our records indicate ... are " & [total] & " and your total expenses
.... " & ...

Note that you will need to have the fields from a table or a query
(preferable) so Access can 'find' the value for [total] and any other fields
you embed in that string.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"FergusonH" wrote in message
...
I'm trying to use a REPORT in Access to generate a letter. Can I have a
field display in the body of the text box? For ex: if my field is [total]
can I have something like "Our records indicate your total purchases are
[total] and your total expenses are..."

thanks!



 




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 12:33 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.