Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / January 2006

Tip: Looking for answers? Try searching our database.

Subreport - Conditional Distance from Top

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan Z. Scharf - 16 Jan 2006 20:43 GMT
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]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.