Reset whole form to defaults

S

Stu

I have a form in which I make numerous changes to label captions, control
visibility, control rowSources, etc. Is there a method to "reset" a form to
its defaults as if it has just opened other than a) closing it and then
re-opening or b) looping through all the controls? I would like to do this
"reset" based on selected user actions, i.e., events.
 
K

Klatuu

Not without you writing it.
I would suggest you write a sub or function that sets the values to the
original values and call it when you you want to reset the values.

If you want to make it really useful and universal, write a class module
that has an Initialize event that reads and stores all the properties of all
the controls on the current form. Then use the gets and sets to manipulate
the values. Then you could call it in the Load event of any form and use it
throught the session.
 

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