Center Control on form in design view

Today I had a control that I wanted to place right at the center of my popup form. I could get it roughly right in design mode, but just not 100% there.

Thankfully Access vba can be used to write developer helper functions as well as codes for the user interface. So I came up with this simple function that centers a control on a form, based on the width of the form. I used it while I had my form open in design view, and the button I wanted to center was selected.


Ask a question, leave some feedback, post a reply!

This site uses Akismet to reduce spam. Learn how your comment data is processed.