The anchoring feature has been available since Access 2007, but I noticed from several
questions posted in the forums that some users are still not aware of it, or that they are
not sure when to use it. It's always been considered best practice to design Access forms
to the least common screen resolution for your users. But in today's proliferation of
large screen monitors with really high screen resolutions, how do you accommodate
usability with good design. Essentially, the dilemma is how to design a form for a small
screen and yet look good on a large one.
La función de anclaje ha estado disponible desde Access 2007, pero
noté por varias preguntas publicadas en los foros que algunos usuarios
aún no lo conocen o que no están seguros de cuándo usarlo. Siempre se
ha considerado la mejor práctica para diseñar formularios de acceso a
la resolución de pantalla menos común para sus usuarios. Pero en la
proliferación actual de monitores de pantalla grande con resoluciones
de pantalla realmente altas, ¿cómo se adapta la usabilidad con un buen
diseño? Esencialmente, el dilema es cómo diseñar un formulario para
una pantalla pequeña y, sin embargo, verse bien en uno grande.
Before Access 2007 and the anchoring feature, most developers resort to some API
routines to re-size the form and its controls automatically based on screen resolution.
This technique worked very well but not without its drawbacks, such as the additional
dependency to the OS API code and the additional burden of maintaining extra code to
accommodate varying user environments.
Anchoring can help alleviate some of the problems with designing Access forms for
different screen resolutions. One caveat, however, is that it's not the answer to all the
problems with re-sizing form controls. To illustrate how to use the anchoring feature, we
will use the simple table structure shown in Figure 1.
Please note that the Address and Notes fields were intentionally left small to illustrate
anchoring features later on in this article.
If we view that form in Form View, we might see something like what is shown in
Figure 3.
Figure 3 displays the form in a Tabbed Document setting, which is the default settings
in Access. Notice that there are plenty of "white" space on the form when the form is
maximized to cover the whole screen. Figure 4 shows some design changes we can do
to this form with the anchoring feature.
To access the Anchoring feature, we must go back to the form's Design View and select
the control that we want the anchor applied. Once the control is selected, we then click
on the Arrange tab on the Ribbon and then click on the Anchoring dropdown to select
the anchor we want. Figure 5 shows the Exit button on the form was selected and then
the "Top Right" anchor was then applied to it.
To finish applying anchors to our form, we would then select the attachment control and
also apply the Top Right anchor to it. We would then apply the Stretch Across Top
anchor to the Address field and the Stretch Down and Across anchor to the Notes field.
Figure 6 shows the final product after these changes.
The anchoring feature is a simple way to accommodate various screen resolutions due
to varying user environments, and it eliminates the need to maintain additional code for
re-sizing form controls. However, you must be aware of its limitations because it does
not cover all the possible scenarios that you may encounter within your users'
environments.