setting the visible property

G

Guest

Hi,
I have a form for collecting test results. It is basically a series of combo
boxes. The first combo box holds 12 test categories. Each category can have 1
of 6 different test methods. The 2nd combo box contains the 6 methods -A, B,
C, D, E and F. Methods A, B and C require that you also enter a test name and
score while D, E and F do not. I have the 3rd combo box set up to display the
corresponding test lists for method A, B or C depending on what is selected
in the 2nd combo box. With me so far? This all worked fine except that when
you selected method D, E or F there was this empty testname combo box and
testscore field just sitting there taking up space. So I put code in the
Method lost focus property to set testname and score visible = false if
method D, E or F is selected. This all works great. The problem is when you
go to the next record anything that was set to not visible on the preceding
record is still invisible. So I tried setting everything visible = true in
the on current of the form. This works going forward but if you go back to a
previous record then the things that had been set to invisible are visible
again. Do I have my visible settings in the wrong spot? How can I get the
unneeded fields to disappear and stay invisible for any given record without
being invisible for all records?

TIA. Lynne
 
J

John Vinson

So I put code in the
Method lost focus property to set testname and score visible = false if
method D, E or F is selected. This all works great. The problem is when you
go to the next record anything that was set to not visible on the preceding
record is still invisible. So I tried setting everything visible = true in
the on current of the form. This works going forward but if you go back to a
previous record then the things that had been set to invisible are visible
again. Do I have my visible settings in the wrong spot? How can I get the
unneeded fields to disappear and stay invisible for any given record without

You'll need to use the Current event to *check the value* of the first
fields (which define whether the combos should be visible); set the
visible property to True or False as appropriate (rather than just to
True without checking).

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top