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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't locate right .visible property in format event??

Status
Not open for further replies.

jetspin

Programmer
Mar 5, 2002
76
Hi.

I am tring to prevent a text box and label from appearing
on a 1 page report, but cannot locate the right .visible property for either? Can anyone help?

I can find Application, Column, Controls, Formproperties etc... but not the standard properties like .visible.

Here is what I have so far...Please note how I had to select 'FORM' to get to the "VISIBLE" property which
is not for the text box or label. Am I at the wrong
event? I eventually want to suppress the printing of this
'row' and have all next text move 'up if possible.

Thanks.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.txtordOther1Out = "" Then
Me.txtordOther1Out.Form.Visible = False
Me.lblOther1.Form.Visible = False
End If

End Sub
 
Not sure why you are writing it this way.
Do you have a subform?

Me.txtordOther1Out.Form.Visible = False
Me.lblOther1.Form.Visible = False


If you don't have a subform, it should be like this:

Me.txtordOther1Out.Visible = False
Me.lblOther1.Visible = False
 
Hi.

Thanks. You gave idea to ignore the 'helper' and it works.
(I don't know what you call it but as you type, the 'helper' pop up that shows the possible selections to choose from displays Application, Column, Controls, Form properties etc........ and not the standard properties for my text and label fields. I do not have a subform.

So I guess my new question is why is the 'helper' doing this? I have no subform?

This works....
Me.txtordOther1Out.Visible = False
Me.lblOther1.Visible = False

Vern
 
The help is called intellisense, and what it provides, are the properties and methods that are available based only on what it knows about the object in question at design time, sometimes based on the least common denominator of a family of objects. Lots of factors can come into play on what the intellisense sees at design time. In any event, if you know the property exists, and is read/write at runtime, then you should be the write the code, and expect it to do exactly what you've written at run time.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top