Set Values on Report

G

Guest

Is there a way to set the value of a text box on a report through code?

Example:

Dim strVal
strVal=200
Me!txtValue=strVal
-----------------------

When I try to run the above code I get an error "You can not set the value
of this object." However, if I set the "Control" for the text box on the
report to something like =Forms!Test!txtValue everything works just fine.
Why can't you set the value of the text box on the report through code, yet
you can set the value to a txtbox on a form?
 
P

Perry

Don't use a textbox.
If the only purpose is to assign a value to a control on yr report
use a label:
Me!Label1.caption = "Some text"

Don't get discouraged if the caption property isn't intellisensed, you can
use it in
Report_Open()

Krgrds,
Perry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top