Image Buttons
This is the first installment in a series of posts about Access 2007 originally made by one of our developers on the Access team on his own blog that I'm moving here for the broader audience to enjoy.
Up until this point, Access has supported command buttons with text or a picture, but never both at the same time. This has been a long standing request from users: the capability of showing both the caption and the picture. In Access 2007, you will notice a new property off of the command button called "Picture Caption Arrangement".
This property, which can be set to the following values:
- No Picture Caption - This setting is the legacy behavior. If you have a caption specified, the button will show it. If you have a picture, only the picture will be shown;
- General - The image will be shown to the left of the text (if you're in a left-to-right language, like English) or the right of the caption (if you're in a right-to-left language, like Hebrew);
- Top/Bottom/Right/Left - The image will be shown in the specified arrangement: at the top, bottom, right or left of the caption (just pick one).
You will also notice that there is a new "Alignment" property. This property allows you to position the caption and picture within the command button to the following settings (note this property can be used whether you have just a picture, just a caption, or both):
- General - This is the legacy behavior. The image and caption will be positioned the left of the text (if you're in a left-to-right language, like English) or the right of the caption (if you're in a right-to-left language, like Hebrew);
- Left/Center/Right - The image and caption will be positioned to the left, centered or to the right (just pick one);
- Distribute - This is equivalent to the "justified" setting in Microsoft Word. The image and caption will be spaced out to fill out the command button.
With these two new properties (which are of course also available through the OM), you will now be able to create some cool looking command buttons without any label trickery needed. Since you can now use JPEGs, PNGs and other newer image formats with Access 2007, you can create some really impressive buttons.
For example, in the snapshot below I created three buttons using Windows Vista backgrounds as the pictures. I changed the buttons' back style to transparent and played with the alignment and picture caption alignment settings:

Zac is a Program Manager at Microsoft on the team designing Access’s next generation platform infrastructure. He advocates easy to use designs, organizes community efforts, and is the author of The Rational Guide to Microsoft® Office Access 2007 Templates. Zac has been working at Microsoft Corporation since 1999. Before that time, he attended the University of Idaho, from which he holds a B.S. in Computer Science.