Solved

How can I move 2 button controls near the middle of the screen in Access 2003 upon the load of the application?

Posted on 2012-03-21
5
198 Views
Last Modified: 2012-06-22
I am developing an Access 2003 application and I want to move 2 button controls towards the middle of the screen on the load of the application aligned horizontally about 1 inch apart. Do you know how I can achieve this?

Label146 and Label147 are the 2 controls.

Label146.Top = ???
Label146.Left = ???
(Width = 1.0417")

Label147.Top = ???
Label147.Left = ???
(Width = 3.2083")
0
Comment
Question by:zimmer9
  • 3
5 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
Why do the buttons need to be "moved" every time the app opens?
Why not put the button in that location by default?

Moving buttons dynamically is something that is just not done all that often (because of user "expectation" issues)

In other words can you post more details on what you are trying to achieve here?
0
 
LVL 17

Expert Comment

by:ramrom
Comment Utility
Controls belong to a form. I assume a form is opened when the application is started. The open event of that form is where you put the code to position the labels.

By screen I assume you mean the display - so you'd have to get the height & width of the display, divide by2 - that gives you the center.

What if you have a dual monitor setup?

What if the form's window does not include the display center?

Am I with you or do you want to clarify?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
Also confusing is that you say you want to move "Buttons", ...yet you list the details of your "Labels".

So what are we talking about here?

Again, we need much more information...
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
Comment Utility
To be sure, you can set the "Auto Center" property of a form to "Yes".
And the form will always open in the center of the "Access" window.
(You can also set the Movable property to No, so the form cannot be moved.)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now