Checkbox on report - how to make it disappear?

C

Cowboy

I have not found this solution yet - is there a way?
My report is based on a text field (Job1) and Yes/No field (Log1 - i.e.
checkbox). On the report I have coded the text field to disappear if the
checkbox is ticked.
My challengeis: On the report I don't want the checkbox to appear AT ALL -
visible or invisible - since it takes up space even when invisible. Any
advice??
 
J

John Spencer

You have to include the checkbox on the report or do some manipulation in a
QUERY based on the table.

You can set the checkbox control's visible property to Yes (True) in design
view and never make it visible in your report. The checkbox control can be
stacked on top of some other control (since it is not visible it won't be
printed) and then no additional space will be taken up the by control when
printing.

An alternative solution
In a query, you could use something like

Field: ShowLog1: IIF(Log1=True,Job1,Null)

Now you can test ShowLog1(Don't forget to change the control's source from
Log1 to ShowLog1). If you need to completely hide the control you can do that
using some VBA in the format event of the section

Me.Log1.Visible = Not(IsNull(Me.Log1))

By the way, I answered this question on November 27 when you posted it.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

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