Populate unbound txtbox on Report?

  • Thread starter Thread starter S Jackson
  • Start date Start date
S

S Jackson

Can I populate an unbound txtbox using the OnOpen Event?

I have a report. The title of the report will change depending on the
criteria the user selects before opening it. I want to populate an unbound
text box on the report according to this If Statement on the OnOpen Event:

If IsNull(ClosedDate) Then
Me.txtTitle.Value = "LTCR Open Cases"

But, in a report, I don't have the Value property to work with. How else
can I do this?

TIA S. Jackson
 
S. Jackson,

If it's an unbound textbox, you will need to refer to the ControlSource
property, and set it to something like (I haven't checked this, but I
think it will work!)...
Me.txtTitle.ControlSource = "='LTCR Open Cases'"
Probably simpler would be to use a Label instead of a Textbox, and set
its Caption property...
Me.txtTitle.Caption = "LTCR Open Cases"
I would use the Format event of the applicable report section, rather
than the Open event of the report.
 
Thanks!

I used a label instead of a text box.
What confused me was when I didn't see "Caption" as a property selection
(Me.lblTitle. ---- ) in the dropdown I thought it was not available.

S. Jackson
 
Back
Top