Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resetting .left, .top values on a form

Status
Not open for further replies.

Endeavor

Programmer
Oct 21, 2002
14
US
I have an MS Access 2k form with many text & combo boxes that intentionally appear, dissapear and move based on radio buttons selected by the user. The user selects one of 12 reports via radio buttons and the appropriate text/combo boxes related to that report show in the lower section of the form.
Is there a simple way to reset the form so that these objects (text/combo boxes) move back to their default positions without having to keep track of the positions in the code?
Thanks,
Bill
 
Don't believe there is a way to return them to their original position. However, you could, at startup, set the Tag property of each control equal to the location. Then, when you need to reset them, refer to the tag property to do it.

For example,

Tag .... "Left=12;Top=13"

 
I have seen this 'technique' used in older (legacy) programs while converting (updating) to current version(s). I have always disliked (to put it MILDLY!) the shuffle synmdrome, and uniformly replaced the "stuuuuuufffffffffff" with a tab control and simply aportioned the control sets to groups which fit nicely on a single tab. Of course I have never had so many parameters relating to a single form (or report) that the parameterization values could not easily be fitted to a single tab, so for my purposes it was more of an issue of simply setting the control(s) or groups .visible porperty and associating the specific control(s) or groups with the propper form / report.

In some instances, I have used one tab to select the form / report and had that selection also set the tab where the appropiate paramaterization controls were placed. On RARE occassion, I have even duplicated a control (or two) on different Tabs to simpolify the USEWRs task - set it up such that the form/report selection takes the USER directly to the tab to set the appropiate parameters. Set the specific parameters to default values (based on most common usage). Permit USER changtes to the default aparameters and REQUIRE cotrol action (command button) to proceed.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top