Hiding Blank Fields on a form

  • Thread starter Thread starter Nick Bradbury
  • Start date Start date
N

Nick Bradbury

Hi,

I am creating a form that contains test results, the tests are of differing
lengths, e.g. some have 3 operations and others up to 10 operations. In
short what I want is for the form to display only the necessary number of
fields.

Thanks in advance


Nick Badbury
 
Each control has a Visible property which can be modified using VBA. In the
Current event of the form you can use code like the following:

if (fSomeCondition) then
me.Text1.visible=false
else
me.Text1.visible=true
endif

Replace fSomeCondition with the condition that dictates whether a control
should be visible. Depending on the condition, you can shorten this to:

me.Text1.visible=(me.TestType=1)

This would make Text1 visible only when Testtype=1.

Post back if you need more help.
 
Back
Top