From: Cowboy on
I created a Report (based on a Table) - and used VBCode to hide both a
checkbox (Log1) and a textbox (Cat1) if the checkbox is checked.
However, I do not want the checkbox to even reflect on the Report at all -
since it takes up unnecessary space (whether visible/invisible), only the
texbox. If I delete the checkbox from the Report the VBCode does not work. Is
there a way to remove the checkbox from the Report altogether - only leaving
the textbox - without upsetting the VBCode?
From: John Spencer on
You have to include it 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.

In a query, you could use something like

Field: ShowCat1: IIF(Log1=True,Cat1,Null)

Now you can test ShowCat1 (Don't forget to change the control's source from
Cat1 to ShowCat1). If you need to completely hide the control

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

Cowboy wrote:
> I created a Report (based on a Table) - and used VBCode to hide both a
> checkbox (Log1) and a textbox (Cat1) if the checkbox is checked.
> However, I do not want the checkbox to even reflect on the Report at all -
> since it takes up unnecessary space (whether visible/invisible), only the
> texbox. If I delete the checkbox from the Report the VBCode does not work. Is
> there a way to remove the checkbox from the Report altogether - only leaving
> the textbox - without upsetting the VBCode?
 | 
Pages: 1
Prev: limit of printer margin
Next: DoCmd.SendObject