Hiding a field on a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am creating a Db and i have a report which i want to check whether another
field is empty on that report and if it is hide another.

E.g

If CCD = "" Then

[PO Number].visible = false
End If

The problem i have is that putting this in onOpen is too early to check
whether it is empty but i want to execute this once the data is in the report
and before the user can print.

Is this possible?

Cheers

Danny
 
Try adding another text box, and set its Control Source to:
=IIf(Nz([CCD], "") = "", Null, [PO Number])

If CCD is Null or is a zero-length string, this text box will be blank;
otherwise it will show the PO Number.
 
Just to add to Allen advice one more thing, set the CanShrink property of the
text box and the section where the text box is located in to Yes, that way
the field wont be visible if there is no value.

--
Good Luck
BS"D


Allen Browne said:
Try adding another text box, and set its Control Source to:
=IIf(Nz([CCD], "") = "", Null, [PO Number])

If CCD is Null or is a zero-length string, this text box will be blank;
otherwise it will show the PO Number.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Daniel Lees said:
Hi

I am creating a Db and i have a report which i want to check whether
another
field is empty on that report and if it is hide another.

E.g

If CCD = "" Then

[PO Number].visible = false
End If

The problem i have is that putting this in onOpen is too early to check
whether it is empty but i want to execute this once the data is in the
report
and before the user can print.

Is this possible?

Cheers

Danny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top