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

Hiding controls if null 1

Status
Not open for further replies.

waldo7474

Technical User
Dec 30, 2002
38
US
Hi All!!

I would like to make some of my controls (and even some subforms) on my main form invisible unless they contain values. I am sort of new to VBA and not sure if there is a command like NotNull or something. The normal situation I would like them to all be is not visible and then if that control contains a value then it is shown. I was also hoping to do this with subforms if that is possible. Any help would be greatly appreciated.

Thanks in advance.
 
Okay,

Set Ur Controls Visible To False In Form Design, then on FormLoadEvent Write This:
If Not IsNull(Me.ControlName) Then
Me.ControlName.Visible = true
End If

And that code should be work even w/subform.

Good Luck Do It Well, Or Don't.
 
Thank you works great!!!

I appreciate all the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top