Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IsVisible Property

Status
Not open for further replies.

jaydy

MIS
Nov 9, 2003
27
PH
hi guys,

is there anything wrong with this simple line of code:

If Me!ArtistID.IsVisible Then
rs!ArtistID = Me!ArtistID
Else... bla bla

I just want to check if this control named ArtistID is visible and use that as a condition in my if-else statement. but i keep on getting this run-time error '2455' which says 'You entered an expression that has an invalid reference to the property IsVisible.'

can anyone shed some light on this for me pls? thanks!

 
Hi misa03,

The Property is Visible (not IsVisible) ..

[blue][tt]If Me!ArtistID.Visible Then
:
:[/tt][/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
i checked with VB Help and saw an example of a code using the IsVisible property, but anyway, .Visible worked..thanks man :)
 
misa03 - IsVisible is a property of some objects, so its quite likely that you did see such an example in the VB Help. Many script objects have an IsVisible property whereas most standard form controls use the Visible property. Third party, and add-in ActiveX controls, you have to check individually to see what properties they support. When in doubt (for any method/property), you should check the "Applies To" list to insure that it applies to the object you're working with.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
The .IsVisible property is a listed property of the native Texboxt Ojbect (and most native controls shows in the Applies To list), but, when entering the helpfiles on the IsVisible property, this is the first line:

xpF1 said:
You can use the IsVisible property in Visual Basic to determine whether a control on a report is visible. Read/Write Boolean

A bit further down:
xpF1 said:
You can set the IsVisible property only in the Print event of a report section that contains the control.

CajunCenturion is right when stating the native form controls use the .Visible property. The .IsVisible property is available only for reports.

So - had you been doing this in a report, it would have been OK, but in a form, it doesn't work (2455).

Funny though, on my setup, IsVisible doesn't show in the intellisence drop down when working in reports, but using the property works. When working within forms, IsVisible shows in the intellisence drop down, but doesn't work;-)

Roy-Vidar
 
roy vidar,

yeah it does show on the drop-down, that's why i thought it would work...anyway, thanks you guys for the help :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top