Kamis, 08 September 2022

Re: [MSAccessProfessionals] Hiding the label on a report based on a subreport field

Try using HasData:

If Me.replcasubrep.Report.HasData Then

Paul

------ Original Message ------
From: "M Garcia via groups.io" <toukey1=yahoo.com@groups.io>
Sent: 9/8/2022 6:49:48 AM
Subject: [MSAccessProfessionals] Hiding the label on a report based on a subreport field

Hello,

I am successfully using the following code to hide the label (text field) of a field on a report if the field is null and if the field is not null, display the label.
        =IIf([situation] Is Null,Null,"Situation:")

However on the same report I have a subreport and I would like to hide the label (text field) on the main report based on if a field in the subreport is Null.  I tried the following but the Label "Extensions" is still being displayed although there's no data.
        =IIf([repclasubrep].[Report].[clause_name] Is Null,Null,"Extensions:") 

On the property sheet of the subreport, the name = replcasubrep and the source object = Report.repclasubrep

Any assistance on where i am going wrong would be greatly appreciated.

Regards
Toukey

Tidak ada komentar:

Posting Komentar