473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Adapt Lebans' AutoSizeFont\AutoSizeFontVer2.mdb tools to report?

MLH
Was hoping to make use of AutoSizeFont\AutoSizeFontVer2.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 1387
MLH wrote:
>Was hoping to make use of AutoSizeFont\AutoSizeFontVer2.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.FontSize = 12 To 4 Step -1
If fTextHeight(Me.textbox) < Me.textbox.Height _
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
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...
2
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...
3
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...
7
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...
16
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...
6
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...
5
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...
6
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...
8
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.