Selective display of fields/buttons in a subform

  • Thread starter Thread starter RoBo
  • Start date Start date
R

RoBo

Who can give me a hand?

In a subform, displayed on a tab control, I would like to hide/show several
fields, based on the value of one of the fields in this subform. If the field
'Description' contains a specific value, some fields on the subform should be
hidden, aswell as two buttons. With what event can I control this?

Thanks for all the help, Ron
 
The code you want is something like this:

IF Description = Whatever_You_Want_It_To_Equal THEN
Control_You_Want_To_Hide.Visible = False
ELSE
Control_You_Want_To_Hide.Visible = True
End IF

I'd put it in the Form_Current event (so that it executes when the form is
loaded and whenever the record being viewed on the form is changed) and also
the LostFocus event for Description field (so that it will execute when the
Description field loses the focus, whether or not the value in Description
has changed).

Hope that helps...

Regards, Chris
 
Back
Top