Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2007

Tip: Looking for answers? Try searching our database.

Set Values on Report

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gabriel - 30 Jan 2007 20:11 GMT
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?

Signature

Thanks,
Gabriel

Perry - 30 Jan 2007 20:29 GMT
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

> Is there a way to set the value of a text box on a report through code?
>
[quoted text clipped - 11 lines]
> yet
> you can set the value to a txtbox on a form?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.