expression in query in order to eliminate yes/no field in report

M

Michele

I read a most useful comment by John Spenser on how to prevent a field from
appearing in a query- in that case it was people's telephone numbers that
they did not want on a contact list.
I am doing something similar and replicated the expression which worked- it
did not list the content of the field.
However, it still appears in the report, just the content is void.
The expression looks like this
ShowCytologyReasonBleeding:
IIf([ynCytologyReasonBleeding]=True,[ynCytologyReasonBleeding],Null).
I do not want the field to appear in the report at all if it wasn't ticked.
Is there any way of doing this?
Should the expression be in the report on not in the query, like I did it?
 
M

Marshall Barton

Michele said:
I read a most useful comment by John Spenser on how to prevent a field from
appearing in a query- in that case it was people's telephone numbers that
they did not want on a contact list.
I am doing something similar and replicated the expression which worked- it
did not list the content of the field.
However, it still appears in the report, just the content is void.
The expression looks like this
ShowCytologyReasonBleeding:
IIf([ynCytologyReasonBleeding]=True,[ynCytologyReasonBleeding],Null).
I do not want the field to appear in the report at all if it wasn't ticked.
Is there any way of doing this?
Should the expression be in the report on not in the query, like I did it?


What's the difference? An empty text box on the report or
an invisible text box. Seems like the only thing a user
could possible see is a label or the text box's border.

If that's what you want to hide, then add a line of code to
the text box section's Format event procedure:

Me.thetextbox.Visible = Not Me.ynCytologyReasonBleeding

If that text box is on a "line" by itself, you can then use
the text box's and its section's CanShronk property to
reclaim the "line's" verticle space.
 

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

Top