bruce@aristotle.net wrote:[color=blue]
> "How can you format your print output" is a pretty broad question.
> However, looking at the threads regarding your OLE quandary, I think
> the answer to your question lies in your report's Detail Format event
> as Stephen Lebans mentioned. Try adding the following code to your
> report:
>
> In the General Declarations section add the following
> declarations:
>
> Dim mlngDetailDefaultHeight As Long
> Dim mlngOLEDefaultHeight As Long
>
> Then modify your Report_Open and Detail_Format event code as follows:
>
> Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
>
> If IsNull(OLEBound1) Then
> OLEBound1.Height = 0
> OLEBound1.Visible = False
> Me.Detail.Height = 0
> Else
> OLEBound1.Visible = True
> OLEBound1.Height = mlngOLEDefaultHeight
> Me.Detail.Height = mlngDetailDefaultHeight
> End If
>
> End Sub
>
> Private Sub Report_Open(Cancel As Integer)
>
> ' Save the default height of the OLE control and the
> ' detail section it is in.
> mlngOLEDefaultHeight = OLEBound1.Height
> mlngDetailDefaultHeight = Me.Detail.Height
>
> End Sub[/color]
I forgot to mention that this assumes your OLE control is named
'OLEBound1'. If it's named differently, replace appropriately. Also,
you can probably get away with declaring your height storage variables
as integer rather than long, e.g.
Dim mintDetailDefaultHeight As Integer
Dim mintOLEDefaultHeight As Integer
HTH,
Bruce