Changing ControlSource property for a text box using visual basic

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

Guest

Dear Access people,

I want to change the ControlSource property for a textbox when the report is
open. I have the following code in the Report module for changing the
textbox:
Me!Criteria.ControlSource = "SOPInfo"

What Sub would I use for this? If you could, please give me an example
since I am not an expert, but am trying. Thanks in advance.

Neal
 
Dear Access people,

I want to change the ControlSource property for a textbox when the report is
open. I have the following code in the Report module for changing the
textbox:
Me!Criteria.ControlSource = "SOPInfo"

What Sub would I use for this? If you could, please give me an example
since I am not an expert, but am trying. Thanks in advance.

Neal

If SOPInfo is a field name, and you use the Report's Open Event, your
code should work. Anywhere else is too late.

If SOPInfo is just some text you wish to print out, then, in the Open
event:
Me!Criteria.ControlSource = "= 'SOPInfo' "
 
Back
Top