Easy One - How to reference Label in report from Code

  • Thread starter Thread starter Angelsnecropolis
  • Start date Start date
A

Angelsnecropolis

I need the caption of a Label in a report to change depending on whether or
not a combobox on a form has data typed in or no data typed in.

Help?
 
In report design view, right-click the label and:
Change To | Text Box

Set the Control Source property of this text box to:
=[Forms].[Form1].[Text0]
using the name of your form instead of Form1, and the name of the text box
on the form instead of Text0.

Or perhaps you want an expression such as:
=IIf([Forms].[Form1].[Text0] Is Null, Null, "It has data")

Note that:
a) The form must be open for this to work, and
b) It will give the same answer for all records on the report.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
Back
Top