R
RitaG
Hi.
I have a very busy form with lots of detail on it and a couple of subforms.
The last subform is based on rows in another table. If there are no rows in
the last subform I set the Visible property of that subform (and 2 labels and
textbox that go along with it) to False. This prevents the associated labels
and textbox from printing. BTW, the subform did not print if there were no
rows in it but I still set the Visible property to False.
All the information prints easily on 1 page when the last subform and 2
labels and textbox are not printed. I set the Visible property to False in
the Detail Format Event.
However, I'm still getting a second page with just the Page Header on it.
I've tried several things to get that last page to not print but to no avail.
What's interesting is that the Intellisense does not show the Visible
property but it does hide the objects when I set them to Invisible.
Here's my code from the Report:
Private Sub Detail1_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me.txtBaseSCRID) Then
Me.lblPhaseX.Visible = False
Me.lblBaseSCRID.Visible = False
Me.txtBaseSCRID.Visible = False
Me.SubFrmSCR_Links.Visible = False
Else
Me.lblPhaseX.Visible = True
Me.lblBaseSCRID.Visible = True
Me.txtBaseSCRID.Visible = True
Me.SubFrmSCR_Links.Visible = True
End If
End Sub
Any suggestions will be greatly appreciated.
Thanks.
Rita
I have a very busy form with lots of detail on it and a couple of subforms.
The last subform is based on rows in another table. If there are no rows in
the last subform I set the Visible property of that subform (and 2 labels and
textbox that go along with it) to False. This prevents the associated labels
and textbox from printing. BTW, the subform did not print if there were no
rows in it but I still set the Visible property to False.
All the information prints easily on 1 page when the last subform and 2
labels and textbox are not printed. I set the Visible property to False in
the Detail Format Event.
However, I'm still getting a second page with just the Page Header on it.
I've tried several things to get that last page to not print but to no avail.
What's interesting is that the Intellisense does not show the Visible
property but it does hide the objects when I set them to Invisible.
Here's my code from the Report:
Private Sub Detail1_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me.txtBaseSCRID) Then
Me.lblPhaseX.Visible = False
Me.lblBaseSCRID.Visible = False
Me.txtBaseSCRID.Visible = False
Me.SubFrmSCR_Links.Visible = False
Else
Me.lblPhaseX.Visible = True
Me.lblBaseSCRID.Visible = True
Me.txtBaseSCRID.Visible = True
Me.SubFrmSCR_Links.Visible = True
End If
End Sub
Any suggestions will be greatly appreciated.
Thanks.
Rita