Hiding subforms

ruth10uk

New member
Local time
Today, 23:15
Joined
Feb 27, 2003
Messages
7
Please can someone help!!! I have a subform and text box within a form and I want the subform and text box to be hidden unless there is data in it. Please can someone explain it to me in easy terms as I am new to the database creating game.
Thanks Ruth
 
In the On Current Event of the form add the foolowing:

if isNull(me.textboxname) then
me.textboxname.visible = False
End if

HTH
 
You need both sides of the If:


if isNull(me.textboxname) then
me.textboxname.visible = False
else
me.textboxname.visible = True
End if
 
Hiding more than one subform

To hide a subform I'm using the following code on the main form

Private Sub Form_Current()
With Me![stage B].Form
.Visible = (.RecordsetClone.RecordCount > 0)
End With
End Sub

It works but how do I make it work on more than one subform.
Thanks Ruth
 

Users who are viewing this thread

Back
Top Bottom