Bill,
Normally, constant height for subforms is considered the preferred approach.
However, if you are keen to implement run time manipulation of subform height as per number of rows on display, my sample db named Form_DynamicSizingOfSubform, might be of interest to you.
Apart from adjusting the height of subform control at run time, presence or absence of vertical scroll bar is manipulated (using form's Scrollbars property) in such a manner that it appears only if the number of records happens to be more than what can be displayed within the maximum allowed height of subform.
The demo covers both views for the subform, i.e. continuous form as well as datasheet. The view can be toggled from one to the other by clicking a command button.
In case of datasheet view, care has been taken to dynamically adjust the column widths so that no awkward blank space is visible at right in lieu of scroll bar when it is not needed.
The sample db (Form_DynamicSizingOfSubform) is available at Rogers Access Library. Link -
http://www.rogersaccesslibrary.com/forum/forum_topics.asp?FID=45
Note:
The sample db covers a single subform. If multiple subforms are to be used vertically spaced, suitable code would have to be added for run time adjustment of top position of subforms (other than the top one).
Best wishes,
A.D. Tejpal
------------
----- Original Message -----
From: Crystal
To: MS_Access_Professionals@yahoogroups.com
Sent: Monday, November 28, 2011 07:26
Subject: Re: [MS_AccessPros] Can Sub forms grow?
Hi Bill,
Welcome!
you can use code to change the size of subforms. They are different from subreports in this respect.
Warm Regards,
Crystal
Access Basics by Crystal (Bill Mosca's site)
http://thatlldoit.com
Free 100-page book that covers essentials in Access
*
(: have an awesome day :)
*
________________________________
From: "Bill.Singer
I am new to this group so I though I would jump in.
I have a 4 different pieces of information coming from 4 different colums in a table that I would like to view on one form. The quantity of individual records in each sub form will change with each option chosen. I am wondering if there is any way to make sub form will grow or shrink with the amount of records to be displayed?
Thanks,
Bill in MN
[Non-text portions of this message have been removed]
Minggu, 27 November 2011
Re: [MS_AccessPros] Can Sub forms grow?
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar