Hi,
I'd like to set the distance from Top of a subreport at Runtime, depending
on the contents of a Detail field
I've tried the code below plus variations , but the effect is to blank out
the subreport entirely on the parent report for every detail record.
Is this possible to do at runtime?
Thanks.
Alan
Code
------------------------------------------------------
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.ParCode = "PCPG" Then
Me.Controls("srptFundIDsCrosstab").Properties("Top") = 6.875
Else
'Me.Controls("srptFundIDsCrosstab").Properties("Top") = 8.5833
End If
End Sub
Duane Hookom - 16 Jan 2006 22:19 GMT
How high is your detail section? Are you using the default Scale which is
TWIPS? A twip is 1/1440 of an inch.

Signature
Duane Hookom
MS Access MVP
--
> Hi,
>
[quoted text clipped - 21 lines]
>
> End Sub
Marshall Barton - 16 Jan 2006 22:26 GMT
>I'd like to set the distance from Top of a subreport at Runtime, depending
>on the contents of a Detail field
[quoted text clipped - 13 lines]
>
>End Sub
The size and position properties are specified in twips in a
VBA procedure. I don't know what units you are specifying
above, but there are 1440 twips per inch.

Signature
Marsh
MVP [MS Access]
Alan Z. Scharf - 17 Jan 2006 19:41 GMT
Duane & Marshall,
Thanks very much.
I didn't know about twips.
That did the trick.
Regards,
Alan
> >I'd like to set the distance from Top of a subreport at Runtime, depending
> >on the contents of a Detail field
[quoted text clipped - 21 lines]
> Marsh
> MVP [MS Access]