A
Amit
MS Access 2K, Windows XP
========================
Hi,
I have a main report (rptOrg) that lists the Organization
names and their details. I have a sub-report (srptPhone)
that has the phone number for the Organization. I've
included the sub-report in the main report.
For both rptOrg and srptPhone, I have the Detail section
set to "Can Grow: Yes", and "Can Shrink: Yes". Plus, the
txtPhoneSR has the same properties set to "Yes".
I have two controls on srptPhone: lblPhone and txtPhoneSR.
The Control Source for txtPhoneSR is:
=IIf(IsNull([ResourcePhone]),"",Format([ResourcePhone],"!
@@@-@@@-@@@@")) & IIf(IsNull([ResourcePhoneExt]),""," x" &
[ResourcePhoneExt])
I have the following code in srptPhone:
===========================================================
Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
If IsNull(Me.ResourcePhone) Or Len(Me.ResourcePhone) =
0 Then
Me.txtPhoneSR.Visible = False
Me.lblPhone.Visible = False
Else
Me.txtPhoneSR.Visible = True
Me.lblPhone.Visible = True
End If
End Sub
===========================================================
The problem I'm having is that for the organizations that
don't have a phone number, there is an empty line in the
main report, instead of it being shrunk and the text below
the srptPhone moving up to fill the empty line. And, I'm
not sure how to correct this. Any help will be much
appreciated.
Thanks!
-Amit
========================
Hi,
I have a main report (rptOrg) that lists the Organization
names and their details. I have a sub-report (srptPhone)
that has the phone number for the Organization. I've
included the sub-report in the main report.
For both rptOrg and srptPhone, I have the Detail section
set to "Can Grow: Yes", and "Can Shrink: Yes". Plus, the
txtPhoneSR has the same properties set to "Yes".
I have two controls on srptPhone: lblPhone and txtPhoneSR.
The Control Source for txtPhoneSR is:
=IIf(IsNull([ResourcePhone]),"",Format([ResourcePhone],"!
@@@-@@@-@@@@")) & IIf(IsNull([ResourcePhoneExt]),""," x" &
[ResourcePhoneExt])
I have the following code in srptPhone:
===========================================================
Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
If IsNull(Me.ResourcePhone) Or Len(Me.ResourcePhone) =
0 Then
Me.txtPhoneSR.Visible = False
Me.lblPhone.Visible = False
Else
Me.txtPhoneSR.Visible = True
Me.lblPhone.Visible = True
End If
End Sub
===========================================================
The problem I'm having is that for the organizations that
don't have a phone number, there is an empty line in the
main report, instead of it being shrunk and the text below
the srptPhone moving up to fill the empty line. And, I'm
not sure how to correct this. Any help will be much
appreciated.
Thanks!
-Amit