473,779 Members | 1,921 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 1411
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
2504
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
3309
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
2639
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
3061
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
2313
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
5486
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
9632
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
10136
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10071
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9925
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8958
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7478
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
5501
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4036
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
3631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.