Access Form Resizing Based on Screen Resolution

Here’s another question we see ever so often in the discussion forums.

As technology has advanced, screen resolution continues to grow making existing forms no longer acceptable to work with.  So what can be done about it?  How can we distribute a database so that it work on any PC with varying screen resolutions?

I first faced this issue myself about 10 years ago.  After developing a complex database for one of my client’s and having it in production for about 2 years, they decided to include a new department in its usage, problem being they all used laptops with smaller screens.  My database had been developed for one department and their screens and now ported onto this new department’s laptops, my forms no longer fit nicely within the monitor and users needed to continuously scroll.  Not acceptable!

Luckily for me, I had a copy of Access 97 Developers Handbook (the best book ever!) and within it’s pages I found form resizing code to do the job. Luckily, you don’t even need a copy of the book as the code was given to theaccessweb.com and can be accessed at: Automatically resize forms to current screen resolution.

For no particular reason, for another project, I purchased Peter’s Software Shrinker Stretcher (from http://www.peterssoftware.com/ss.htm – no longer available) and it was a simple drop into place and use module. Another great tool.

Over the years, I have come across many other pieces of code, should you wish to explore other potential solutions/samples, such as:

As a general rule though, you always want to develop using the lowest resolution. Form resizing upwards (stretching) is typically easier and with less issues than resizing downwards (shrinking). You may find the UtterAccess post Screen Sizes For Developers, Any Version useful to dimension maximum form sizes to ensure they fit properly in different screen resolutions.

Important Warning
Be aware that for simple forms, the entire process is almost instantaneous, but for more complex forms, with multiple subforms, resizing will increase load times and in some cases quite significantly.

Access 2007+

Did you know, with accdbs you can use anchoring to create dynamically resizing of forms without any need of code. It won’t be the solution to every situation, but in many cases it works flawlessly. Something to explore perhaps.

… you can use the FitToScreen property of a form – on the Format tab of the property dialog. You can also make use of the Horizontal Anchor and Vertical Anchor of objects  – read up on this before you try – it is not as intuitive as it appears.  — Jeanette Cunningham (Access MVP)

5 responses on “Access Form Resizing Based on Screen Resolution

  1. Bill Mosca

    Hi Daniel – your link labeled ” Automatically resize forms to current screen resolution.” (http://theaccessweb.com/general/gen0002.htm) takes me to the AccessWeb site but the link on that page takes me to https://www.mcwtech.com/.

    I know you aren’t in charge of that link, but I thought you should be aware of is seeing how you referenced it in a forum post. (https://social.msdn.microsoft.com/Forums/en-US/11bb3d5e-ca91-436c-ba96-91145f078e3a/how-to-auto-resize-access-forms-to-resolution-on-different-monitors?forum=accessdev)

  2. Graeme Burton

    Hi. I would love to get Shrinker Stretcher but does Peter’s Software still exist? Seems to have gone into politics.
    Thanks. Love your sites VERY helpful.
    Graeme.