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 / Reports / Printing / January 2006

Tip: Looking for answers? Try searching our database.

Referencing a Report's Control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tru - 22 Jan 2006 02:05 GMT
I am trying to make a Label Control Visible based on the value of a Textbox
in my Report's Open Procedure:

If txtSubTotals.Text = "No Data" Then
 lblMessage.Visible = True
Else
 lblMessage.Visisble = False
End if

The problem is I am receiving this error message:

"2185" You can't reference a property or method
for a control unless the control has focus.

I am a little confused because I am using a Label Control on my Report.  
Could you please provide with the proper code to accomplish this task.  I
tried looking for this error in the Knowledgebase (No Luck).

Signature

Thanx!

Tru - 22 Jan 2006 02:53 GMT
Got it! Used the OnFormat Property, Thanx anyway.
Signature

Thanx!

> I am trying to make a Label Control Visible based on the value of a Textbox
> in my Report's Open Procedure:
[quoted text clipped - 13 lines]
> Could you please provide with the proper code to accomplish this task.  I
> tried looking for this error in the Knowledgebase (No Luck).
Marshall Barton - 22 Jan 2006 03:36 GMT
>I am trying to make a Label Control Visible based on the value of a Textbox
>in my Report's Open Procedure:
[quoted text clipped - 13 lines]
>Could you please provide with the proper code to accomplish this task.  I
>tried looking for this error in the Knowledgebase (No Luck).

Your use of the Text property is causing the error.  You
should use the Value property instead.

However, since you said you were doing this in the report's
Open event, that shouldn't work either,  The Open event is
too early for the Value property of controls to be
available,

Perhaps I could make an alternative suggestion if you
explained what you're trying to accomplish in the report.

Signature

Marsh
MVP [MS Access]

 
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.