Search code examples
ms-accessbutton

How do you auto fit an image on a button so that you don't have to stretch the button to show the picture in Access 2010?


I'm building an access database for my music catalog. I've created one main table with a bunch of queries. I want to make a decent looking front end. I have a bunch of buttons with macros assigned to them already. The problem (which I presume is something very small that I'm missing) is that I added a picture to the button it's just a picture of vinyls that would run a query to show my vinyls. The picture only displays a portion rather than the whole picture. I can get it to show the picture by expanding the button size but this is not desired.

Any help is appreciated.

Thank you and Happy Thanksgiving.


Solution

  • The button doesn't resize the image you assign to it.
    You first need to resize your picture files to whatever size you deem suitable for the button, then use that scaled down image.

    Alternatively, you can use the Image control instead of a button. That control will allow you to resize the image inside it, but it will generally appear slightly blurry, depending on the image and the dimensions you resize it to.
    Also, forcing Access to load larger image and then resize them can make your application less responsive if you have a lot of images, since you make it do extra work.