Search code examples
imagems-accessbuttonpngtransparent

How to add a transparent image to MS Access 2010 button control?


Normal intuitive way, like hitting the Picture property's "..." button and clicking Explore to choose a file doesn't work with transparent ico files (MS Access returns an error), and it doesn't work on bmp files, as there is no easy way to specify transparent color for them. There are heaps of trials on the Internet to handle this with special software, extra modules or even custom multipart pictures drawn on the buttons - all way too complicated.

Is there a simple way to add a transparent picture to MS Access button control?


Solution

    1. Draw an image control on the form and select an image with transparency (I used .PNG files)
    2. Change the property 'Picture type' to 'shared' (noting control name or image name)
    3. Click the button control
    4. Click the property 'Picture' and you will see the picture from the image control is now available for selection, select it.
    5. You can now change the button control 'Picture type' to 'Embedded'

    You should now have a transparent image that isn't compatible with buttons on a button control. For each new button image required, simply change the image control picture source to your desired image and then use that shared image as the image for your button control. Once you have your buttons with the desired images, simply delete the image control.

    source: http://www.tek-tips.com/faqs.cfm?fid=7541