473,789 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adapt Lebans' AutoSizeFont\Au toSizeFontVer2. mdb tools to report?

MLH
Was hoping to make use of AutoSizeFont\Au toSizeFontVer2. mdb
procedures to auto-resize fonts in a textbox control on a report when
the fixed physical size of the textbox was insufficient to display all
the text in the source table's memo field. One could, I suppose,
simply count the displayable chars at various acceptable fontsize
settings and use If-Then or Select Case to effect an appropriate
change.

But Lebans' solution, I think, is a more elegant one. I'm just not
sure I can make it work with reports.
Jul 9 '08 #1
1 1412
MLH wrote:
>Was hoping to make use of AutoSizeFont\Au toSizeFontVer2. mdb
procedures to auto-resize fonts in a textbox control on a report when
the fixed physical size of the textbox was insufficient to display all
the text in the source table's memo field. One could, I suppose,
simply count the displayable chars at various acceptable fontsize
settings and use If-Then or Select Case to effect an appropriate
change.

But Lebans' solution, I think, is a more elegant one. I'm just not
sure I can make it work with reports.

Check the samples in the mdb file. They demonstrate the
code for what you want (which is the same for reports and
forms).

The code you're looking for will be vaguely like:

For Me.textbox.Font Size = 12 To 4 Step -1
If fTextHeight(Me. textbox) < Me.textbox.Heig ht _
Then Exit For
Next

--
Marsh
Jul 9 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3417
by: Bruce Rusk | last post by:
I'm using Stephen Lebans' RTF2 control in a report, and have discovered what may be a slight bug in it. I have a lot of non-Western language (Chinese) text in my RTF field, and such records get sized strangely using the .RTFHeight property of the control. Specifically, lines of text get cut off the bottom of the control when I use the code provided in the sample report on the lebans.com site. It seems that when there is Chinese text,...
2
2506
by: Wally | last post by:
Hi All, I'm using Stephan Lebans' nifty code for automatically resizing text fields to the size required to show (almost) all text in that field (CanGrow3, thanks Stephen!). In general this function works great. However, I sometimes have a problem with the last text line. Often the last line is just below the end of the field and to view that line I have to scroll to it. Is that a known problem? And is there a solution?
3
3310
by: Phil Stanton | last post by:
I am trying to produce a program that will output any Access report to an editable Word document. So far it is working well but slowly with text boxes, labels, and lines. I now need to try to output one of Stephen Lebans' RTF2 controls on the report. He indicates that a copy and paste method will work from a form to the Word doc and that is fine although I have not done this in VB, rather used ^C and ^V I suspect that a similar method...
7
2640
by: Mark Thomas | last post by:
Delighted to find Lebans textbox justification but... ....after you have downloaded the sample database, with its module, what do you do to make your own text boxes in your own database have justified text? I have tried copying the module out of the sample database but that, in itself, didn't do the trick.
16
3062
by: DFS | last post by:
If you're listening, I want the middle of the calendar (showing 1 month) to open below the cursor position. It currently opens just to the right and below the cursor position. I hunted through the code, but can't determine what to alter. Very nice piece of work, by the way. Thanks
6
2316
by: ldn95887 | last post by:
I have been using Lebans ReportToPDF code for a couple months without problems. We recently changed the format of the invoice and now the first line of the detail section of my report is missing 2 of the 9 fields. The rest of the report is fine. In looking at his website there is a version note on 2/21/06 indicating he fixed the "missing lines produced by the report line tool issue". I am wondering if this was the problem I am...
5
2597
by: Tim Marshall | last post by:
I'm thinking of using Stephen Lebans Report to PDF utility/dll in a Jet application I'm running (I want to be able email some reports with complex information and the conversion to html just doesn't do it very well). I'm wondering what effect or possible conflict there might be on a system, such as mine or a user's, that already have Adobe Acrobat Professional installed. I'm assuming there wouldn't be - that Stephen's procedures would...
6
4053
by: Tim Marshall | last post by:
Does anyone know if Stephen Leban's ConvertReportToPDF for converting mdb reports to pdf can be done for a print preview of a form? A major Access application I've developed and use displays an MS Graph control on a form. It's dynamic and I'd like my users to be able to print their result to a pdf. I'm able to do so, but I have Acrobat Professional on my own machine. When I run the VBA line:
8
5487
by: grant | last post by:
Hi I've copied Stephens code into my db, and can get it to work, but only on "plain Jane" reports with no images. Most of my reports has an unbound image obluect in them that I set to an external image file using on_open code I've searched through this group and there are a few comments about snapshots not working with embedded images, and my testing seems to
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10410
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5418
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3701
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.