K
Kurt
I have a report with one subreport, linked by ProjectID.
The report shows project information and the subreport
shows a list of tasks assigned to that project.
If there are no tasks in the subreport for that project
(i.e, txtTask is null), the subreport vanishes from the
report. Instead of it disappearing, I would like a label
in the detail section of the subreport to become visible
and read "No tasks have been assigned to this project."
I've tried code in both the On Activate event for the
subreport and the On Print event of the Detail section,
but the subreport still disappears. Should I instead be
putting the code in the main report? (In which case it
would have to refer to the control on the subreport.)
The code I'm using is:
If IsNull(Me.txtTask) Then
Me.lblNoTasks.Visible = True
Else
Me.lblNoTasks.Visible = False
End If
Thanks. Kurt
The report shows project information and the subreport
shows a list of tasks assigned to that project.
If there are no tasks in the subreport for that project
(i.e, txtTask is null), the subreport vanishes from the
report. Instead of it disappearing, I would like a label
in the detail section of the subreport to become visible
and read "No tasks have been assigned to this project."
I've tried code in both the On Activate event for the
subreport and the On Print event of the Detail section,
but the subreport still disappears. Should I instead be
putting the code in the main report? (In which case it
would have to refer to the control on the subreport.)
The code I'm using is:
If IsNull(Me.txtTask) Then
Me.lblNoTasks.Visible = True
Else
Me.lblNoTasks.Visible = False
End If
Thanks. Kurt