VB code opening a report from a checkbox

O

Omper

OK.. here is the deal.

got a form and a report.. the report has a text box on it . the form has a
check box on it. i want the text box to be visible only if the check box is
checked. Not hard right.. please say not hard.. PLEASE..

Chris
 
D

Duane Hookom

You can set the control source of the text box on the report to something
like:
=IIf(Forms!frmYourForm!chkYourCheck = True, [Some Expression], "")
Make sure the name of the text box is not the name of a field.
 
F

fredg

OK.. here is the deal.

got a form and a report.. the report has a text box on it . the form has a
check box on it. i want the text box to be visible only if the check box is
checked. Not hard right.. please say not hard.. PLEASE..

Chris

As long as the form is still open when the report is run, code the
report's Report Header Format event:
[ControlName].Visible = forms![FormName![CheckBoxName]
 
Top