Make form look the same as when opened

I

iamnu

I have SubForm where I am moving controls using "Left" and "Visible"
properties depending on the value of a control on the Main Form.

I want to reset the form so all of the controls will have their
default values, as they were when the SubForm was opened.

Is there a way to do this? And if so, where would this code go?
 
A

Al Campagna

iamnu,
You'll have to reverse your Left and Visible code in order to get
your controls back to where you started... during that form session.
If something about the value of a "control on the main form"
caused you to move those controls left, then something about the value
of "a control on the main form" should cause you to reset the controls to
their original position.
Example... main form control = [SomeValue],
and... using the AfterUpdate of the control on the main form...

If [SomeValue] >=100 Then
'move controls left, and make visible
Else
'move controls right, and make invisible
End if

--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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