I've figured out how to reposition an Access form but I have a new problem.
I have one form I'm using mostly for testing right now. When the user closes it, I'm saving the width, height, top, and left, so I can position it at the same place the next time they open the form.
However, if the user moves the application to his laptop and opens it on there, I want to detect that the form is out of the viewport and bring it back inside the viewport.
You would think I could just calculate this but Access has this thing where WindowTop is at 0 when it's positioned directly underneath the menu bar and ribbon. WindowLeft is at 0 when the form is positioned directly to the right of what I call the "Object Viewer". If I take the WindowWidth and add it to WindowLeft, I'll be as many twips off as the object viewer is wide.
Anyone know a way I can tell where the far left top corner is in an access application (since it isn't 0)?
I have one form I'm using mostly for testing right now. When the user closes it, I'm saving the width, height, top, and left, so I can position it at the same place the next time they open the form.
However, if the user moves the application to his laptop and opens it on there, I want to detect that the form is out of the viewport and bring it back inside the viewport.
You would think I could just calculate this but Access has this thing where WindowTop is at 0 when it's positioned directly underneath the menu bar and ribbon. WindowLeft is at 0 when the form is positioned directly to the right of what I call the "Object Viewer". If I take the WindowWidth and add it to WindowLeft, I'll be as many twips off as the object viewer is wide.
Anyone know a way I can tell where the far left top corner is in an access application (since it isn't 0)?