VB code opening a report from a checkbox

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

Guest

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
 
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.
 
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]
 
Back
Top