Kamis, 24 September 2015

Re: [MS_AccessPros] How to grow or shrink subform according to the number of records?

 

John-
You are right. It's too complicated. I'll just have to leave it. Thanks a lot.
Kevin



发自我的小米手机
在 "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>,2015年9月24日 下午11:34写道:

 

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: zhaoliqingoffice <zhaoliqingoffice@163.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

.

__,_._,___

Tidak ada komentar:

Posting Komentar