473,471 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CanGrow

2 New Member
All textboxes across the record are set to CanGrow, in the details section of a continuous subform of a report, yet different fields grow to varying heights and messy borders.

Is it possible to configure all textboxes to follow the same height of their tallest peer in the same record?

TIA!

Sep 23 '06 #1
3 3270
PEB
1,418 Recognized Expert Top Contributor
Difficult.... Hard ...

But if u create a function that updates the other fields to the len of the bigger field with intervals....

There is a lot of calculations to do this...

You need to know the max rows of every field and synchronize the other with...

However with code you can do it...

:)
Sep 23 '06 #2
BoxTop
12 New Member
You can put a bit of code into the OnFormat event for the detail section of your report.

If Me![TextBox1].Height > Me![TextBox2].Height And Me![TextBox1].Height > Me![TextBox3].Height Then

Me![TextBox2].Height = Me![TextBox1].Height
Me![TextBox3].Height = Me![TextBox1].Height

ElseIf Me![TextBox2].Height > Me![TextBox1].Height And Me![TextBox2].Height > Me![TextBox3].Height Then

Me![TextBox1].Height = Me![TextBox2].Height
Me![TextBox3].Height = Me![TextBox2].Height

ElseIf Me![TextBox3].Height > Me![TextBox1].Height And Me![TextBox3].Height > Me![TextBox2].Height Then

Me![TextBox1].Height = Me![TextBox3].Height
Me![TextBox2].Height = Me![TextBox3].Height

End If


Of course you will need to insert the actual names of your text boxes but hopefully you will get the idea. Please let me know how you get on.
Sep 23 '06 #3
PEB
1,418 Recognized Expert Top Contributor
It seems a very very good idea! :)

But when you try it with the CanGrow property, the Height property shouldn't calculate the CanGrow option and the actual height of the field!

I've tried a report with 2 Fields and this code:

Expand|Select|Wrap|Line Numbers
  1. Me![Key_element].Height = Me!COL01N0002.Height
  2.  
Where Me![Key_element] is placed always on one row and Me!COL01N0002 is placed always on multiple rows using cangrow property


So to get a working function you need to know in which field what number of symbols are stored on one row with the specified formatting...

But in this case you are doing programatical CanGrow and you can desactivize the can grow property!

:)
Sep 23 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

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: Andy Warner | last post by:
Hi all, I am generating a report that adds one of two images (or no image at all) depending on query results. I dont want a great big blank space where the image goes, if NO IMAGE is returned........
1
by: Phil Stanton | last post by:
I am trying to create a text box in Word the same height as one on a report and then fill it with text. I can "read" the position of the text box from the report OK and create a text box in Word...
2
by: DFS | last post by:
Main report contains one large graph in the detail band (no detail records). Subreport snakes just fine (5 columns) when opening by itself. When I add it to the main report (in the report...
3
by: Not Me | last post by:
Hi, I have a report, viewable in continuous form. I don't want the size of the report to change (it should fit address labels on the printer), but in order to minimise the space between empty...
0
by: mosscliffe | last post by:
I have data in a memo/text field which has linefeeds in it. When I use a multiline textbox, it recognises the line feeds and displays correctly. If I use a label it just sees it as one continuous...
0
by: Randy Smith | last post by:
Hi ALL, Is there a property that will shrink or grow the size of my GridView, based on the number of rows? For instance, I've set the PageSize to 7, but oftentimes I'll only have one row of data....
4
by: D.Stone | last post by:
I am having problems formatting an Access 2003 report which is trivial in the extreme (tabular layout, 9 fields from 1 table per row in the detail section, no groups/totals). One field (only) in...
1
by: gandhi.vishal | last post by:
Hello, I have an issue. I'm not seeing the reportviewer data at all. The column names come up fine but there is no data in the report table. Here is what I'm doing I created a dataset with the...
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...
1
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...
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...
1
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...
0
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 ...
0
muto222
php
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.