A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Make form look the same as when opened



 
 
Thread Tools Display Modes
  #1  
Old January 24th, 2010, 03:55 AM posted to microsoft.public.access.forms
iamnu
external usenet poster
 
Posts: 99
Default Make form look the same as when opened

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?
  #2  
Old January 24th, 2010, 01:57 PM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Make form look the same as when opened

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."


"iamnu" wrote in message
...
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?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.