Hi Norbert
The section height is measured in TWIPs, a TWIP being "one twentieth of a point". Since there are 72 points per inch, there are therefore 1440 TWIPs per inch.
So, to set the Detail height to 0.3" you would say:
Me.Section(acDetail).Height = 1440 * 0.3
Note that you will get a run-time error if you try to set the height such that it will not accommodate all of the controls. (Conversely, you will get an error if you resize or reposition a control so that its Top + Height is more than the Height of the section.) Therefore, if you are making controls larger and expanding the section, you must set the section Height first, and if you are making controls smaller and contracting the section, you must set the section Height last.
Best wishes,
Graham
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Monday, 10 October 2016 07:26
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Change Height of Detail Section in Report MS Access 2013
I need to change the Height of Detail Section depending of the value in a field.
intNo=1 then Height=.3"
intNo=2 then Height=.6"
Thanks
Norbert
Posted by: "Graham Mandeno" <graham@mandeno.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