Kevin-
You can do that on a Report simply by designing the subform/subreport control one row high and setting Can Grow to Yes. It's difficult to do on a form - you would have to put code in the Current event of the outer form, calculate the number of rows yourself, then custom set the Height of the subform control to match. In code, you set any width, height, top, etc. property using Twips - 1440 Twips per inch. And you would need blank space below the subform control to be able to expand it without breaking anything. If you have controls below the subform, you would have to dynamically change the Top property to move them in coordination with the height change. Is it really worth the bother?
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
On Sep 24, 2015, at 4:06 PM, 'zhaoliqingoffice@163.com' zhaoliqingoffice@163.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Dear All,
Can anybody teach me how to grow or shrink a subform according to its number of records? Thanks in advance.
Regards,
Kevin
__._,_.___
Posted by: John Viescas <johnv@msn.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar