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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set the position of a Pop-Up Form

Status
Not open for further replies.

pdldavis

Technical User
Oct 29, 2001
522
US
Hi, How does one positon pop-up forms?. I have two pop-up forms that I would like to display in two different areas of the associated main form and am not having any luck doing this. I thought xpos & ypos would work. If it does, I'm not getting the syntax right.
Any help would be appreciated.
Thanks
 
Make sure you set the Form's auto center property to no. Then open the form, position it where you want it, and save it. The next time you open the form, it will be in the same place that you last saved it. I don't know of any way to prevent the user from moving the form around once it's open, but as long as you don't save the form after they move it, it should reopen in the original position.

dz
 
If you really want to get down into the nitty-gritty of it all, it is possible to force a window to open in a certain location everytime through code. This involves registry calls and saves. When the form is closed you have to edit an registry entry with it coordinates and then when open you have to read those coordinates. It is an involved process but can be done. The Access 2000 Developers Handbook Volume 1: Desktop Edition published by Sybex explains all the steps and procedures in Chapter 8. I am almost positive there is a similar section in the 97 edition of this series but I don't have it with me right now to check. It's not important that someone else can do in one step what it took you ten to do...the important thing is that you found a solution. [spin]

Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
 
Thanks for the input. I found it by accident meantime. After I open the popup form I run docmd.movesize and it places the popup where it needs to go and even resizes it. It uses twips for measurement.
Wish I would have noticed that a couple years ago. Would've saved some headaches.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top