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  

Format a line of text in Report



 
 
Thread Tools Display Modes
  #1  
Old May 19th, 2004, 04:21 PM
cameron
external usenet poster
 
Posts: n/a
Default Format a line of text in Report

Hi,

The report should show : "Customer ABC Company has been assigned a tracking number 99999..." - ABC Company in BOLD and 99999 in BOLD

Currently, I have a label & textbox (bound to DB Company) & label & textbox (bound to DB TrackNumber) - textboxes have property = BOLD and this seems to do the job but the length of the company name if its short results in too much spaces before start of label and our customer would like me to shrink/grow this textbox so the line does not have excessive spaces showing.

I tried setting the textbox shrink/grow property to YES but its not doing the job but of course I had the label start at a specified location and this won't move to shrink the line.

Any suggestion of alternate way to report on this line.

Thank you.


  #2  
Old May 20th, 2004, 12:13 AM
Stephen Lebans
external usenet poster
 
Posts: n/a
Default Format a line of text in Report

You can calculate the size of each TextBox and then resize/reposition
accordingly. See:
http://www.lebans.com/textwidth-height.htm
TextHeightWidth.zip is a replacement for the Report object's TextWidth
and TextHeight methods. It is multiline aware and can work in both
Report and Form views. Includes a sample report to show you how to
autosize individual controls with different formatting on the same line
to simulate RTF style text.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"cameron" wrote in message
news
Hi,

The report should show : "Customer ABC Company has been assigned a
tracking number 99999..." - ABC Company in BOLD and 99999 in BOLD

Currently, I have a label & textbox (bound to DB Company) & label &

textbox (bound to DB TrackNumber) - textboxes have property = BOLD and
this seems to do the job but the length of the company name if its short
results in too much spaces before start of label and our customer would
like me to shrink/grow this textbox so the line does not have excessive
spaces showing.

I tried setting the textbox shrink/grow property to YES but its not

doing the job but of course I had the label start at a specified
location and this won't move to shrink the line.

Any suggestion of alternate way to report on this line.

Thank you.



  #3  
Old May 20th, 2004, 03:36 AM
cameron
external usenet poster
 
Posts: n/a
Default Format a line of text in Report

Hi Stephen,

Thank you. I looked your sample .mdb file - rptMixFormatting and this is exactly what I need to implement my line of text.

The txtCustName, LblSep1, txtCusID, LblSep2, txtCusNum -- I cannot figure out where the properties settings are to manipulate the shrink/grow of each controls depending on the length of data to print ? Your results are nicely formatted without excessive spaces in between controls. Could you please explain how you have created the controls ? I am not seeing how this is done !

I have something similar except I have too much spaces between controls if the length of data is short.

Appreciate your help.
 




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 02:38 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.