Forms and visibility

  • Thread starter Thread starter patrick
  • Start date Start date
P

patrick

How do i make a subform only visible when the contents of
a field on the main form has a valid entry (ie is not
blank).

I do not wish the sub form to be visible at any other
time.


pat
 
patrick said:
How do i make a subform only visible when the contents of
a field on the main form has a valid entry (ie is not
blank).

I do not wish the sub form to be visible at any other
time.


pat

Me.SubformControlName.Visible = Not IsNull(Me!FieldName)

You need the code above in the Current event of the main form and in the
AfterUpdate event of the control bound to the field in the expression.
 
How do i make a subform only visible when the contents of
a field on the main form has a valid entry (ie is not
blank).

I do not wish the sub form to be visible at any other
time.


pat

Answered in microsoft.public.access. Please do not multipost: if you
must post to more than one newsgroup, please crosspost by putting all
the relevant newsgroups (no more than three please!) in the Newsgroups
line.

John W. Vinson[MVP]
 
Back
Top