Collective formating

  • Thread starter Thread starter Joe Bohen
  • Start date Start date
J

Joe Bohen

I know it is possible to group controls on a form
(selecting the controls and choosing Group from the format
Menu.) But is it possible to set the format properties of
the group collectively.

i.e. I have a form which has a group of twenty input boxes
along with labels this makes 40 controls, ten input boxes
are dependent on the input of text box 10, it would make
the form far neater if the second group of ten boxes where
visible only after the appropriate input.

Is this possible?
Joe
 
Joe,

If I am reading your question correctly, you want to know
how to have the last 10 (of 20) questions show only after
question 10 is answered. What if they answer question 10
first and then work up to 1 or skip around?

In the answer box's (assuming a text control) AfterUpdate
Event you can do the following
Me.txt11.enabled=True
Me.txt11.visible=True
and repeat for txt12 through txt20.

You might want to make a form procedure that is called by
each of the AfterUpdate events of the controls txt1
through txt10. The form procedure can test if all 10 text
boxes have data in them and then run the above
me.txt##.enabled(visible)=True.

In the form's OnLoad event, call set each of the 11 text
controls' .enabled and .visible properties =False.

You of course can set up loops to loop through the
controls so you do not have to type out or edit multiple
lines.

Hope this answers your question.

Jason
 
I am not sure that you need to toggle the .Enabled property -- i would
think that controlling .Visible would be sufficient.
-=-=
 
Back
Top