Re: Problem with Report code
- From: "Tony Williams" <tw@xxxxxxxxxxx>
- Date: Fri, 31 Aug 2007 15:39:36 +0100
Hi Duane tried your second suggestion and got a prompt box for the name of
the report and Access changed the control source to this
=IIf([rptCReDriving Licence].[Report].[HasData],Null,"Former Label Caption")
Notice the extra square brackets that have appeared???
Any ideas?
Thanks
Tony
"Duane Hookom" <duanehookom@xxxxxxxxxxxxxxxxxx> wrote in message
news:9F3E8726-4A44-445F-9F25-AE60CC9A19A3@xxxxxxxxxxxxxxxx
Try
Me.lblnoinfo.Visible = Not Me.[rptCReDriving Licence].Report.HasData
You might also want to can the code and use a text box rather than label.
Set the control source to:
=IIf([rptCReDriving Licence].Report.HasData, Null,"Former Label Caption")
--
Duane Hookom
Microsoft Access MVP
"Tony Williams" wrote:
Here is my code
Private Sub Report_Activate()
If Me![rptCReDriving Licence].Report.Recordset.RecordCount = 0 Then
Me.lblnoinfo.Visible = False
Else
Me.lblnoinfo.Visible = True
End If
Me.Refresh
End Sub
I have a main report with a number of subreports. in the above example if
the rptCREDriving Licence has no data I want lblnoinfo (which is an
unbound
label) to appear in its place. However it doesn't work. can anyone see
why?
Thanks
Tony
.
- References:
- Problem with Report code
- From: Tony Williams
- Problem with Report code
- Prev by Date: How to automate zoom+ in Print Preview
- Next by Date: Re: Access 2000 reports problem inserting date
- Previous by thread: Problem with Report code
- Next by thread: Re: Problem with Report code
- Index(es):
Relevant Pages
|