visible controls on form

  • Thread starter Thread starter Karen
  • Start date Start date
K

Karen

Okay, I figured out how to make certain controls/fields visible on my form
depending on what is entered in one of the controls (it's always visible).
The remaining controls are all 'no' for visible and in the After Update code
I have some if statements that make the correct controls/fields .visible =
true.

NOW for the question... After the user completes the entry of the data,
filling in the controls/fields they are going to save.
How do I make all of the controls disappear again when the users save?

Karen
 
Karen,

If you are closing the form at the end of the data entry, the form
should be back to "square one" as regards which controls are visible,
the next time you open it. If, on the other hand, you are moving to
another record, or a new record, you will need to use code, similar to
what you already have used, to revert the temporarily visible controls
back to their default visible setting. Maybe the On Current event of
the form will be an appropriate place for this code.
 
Thanks Steve,

Putting the code <controlname>.visible = False for each of the controls that
appear dependent on what is entered for the first control, in the OnCurrent
event works great. I had also thought of putting a 'save' button on the
form but prefer to do it this way.

K-
 
Back
Top