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.
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"
Posted by: "Graham Mandeno" <email@example.com>
|Reply via web post||•||Reply to sender||•||Reply to group||•||Start a New Topic||•||Messages in this topic (2)|