Results 1 to 5 of 5
  1. #1
    gpsmith is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    4

    Combining Images and Text on a Command Button

    Greetings,

    I would like to combine images and text on a command button. I've been looking through some manuals, and have some ideas as to how I might be able to accomplish this, but I'm having trouble actually getting Access 2010 to agree with me.

    The goal is to have something like:
    --------------------------------
    |..--------.............................|
    |.|..........|........................... .|
    |.|.Image.|...Button Text Here...|
    |.|..........|.............................|
    |..--------.............................|
    --------------------------------

    Method 1 - Adding Margins to Button Text
    I'm thinking I could use the Padding option in the Button Properties to introduce some space to the left of the button. Having the text left justified, then, would bump up against that space, and leave me an empty portion of the button at the left where I could paste an image.

    Method 2 - Doing it all as an image


    I can combine the image and text all as an image, and then import it into the button. I'm having trouble, however, making this happen. Do I need to size the image exactly to the button or is there an automatic zoom? Is there a preferred format? Can I do transparency effects so that I don't have to color match the imported image to the two-tone background of the button?

    Method 3 - The right way
    Well, obviously, I haven't found this yet, but I thought I'd leave this here for your thoughts :-)

    Thanks for your help!

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    The 'right way,' I would think, would be, in Form Design View, to

    1. Select the Command Button
    2. Go to Properties - Format
    3. Add the image to the Picture Property
    4. Add your text in the Caption Property
    5. Click in the Picture Caption Arrangement Property and use it to place the text where you want it

    Linq ;0)>

  3. #3
    gpsmith is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    4
    Thanks, that's a great suggestion!

    When I tried it, the picture showed up, but I couldn't scale it to the button. Is there a zoom option like when I simply past a picture on the form for decoration (i.e., a form logo)? If I need to rescale it manually, I can. However, I'm uncertain of the size. The button is 2"x0.6". Do I convert this to my screen resolution, or use something related to the 24 dots per inch scaling?

    There were also problems with the text. When I put in the text, it looks like it is place underneath the image. The placement option also doesn't allow me to tweak the placement, I can only choose left/right/top/bottom/center, and I need an array of several buttons. This knocks out centering as an option because the titles are different widths and it won't visually track.

    I'd like the text to be left-justified, but pushed away from the left edge.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Caption and Image together on button was an Access 2010 new feature. It has limitations, as you have discovered. Cannot zoom the image. I tested with a 10KB bmp image that is 57x57 pixels and it displayed at least 4 times larger than the AddressBook icon. Make the button wider to get the caption on same line as text. Add spaces in front of caption text to get some separation from the image.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by June7 View Post

    ...Caption and Image together on button was an Access 2010 new feature...
    Actually, it was introduced with the James Bond version! Oops...meant the 2007 version!

    Linq ;0)>

Please reply to this thread with any new information or opinions.

Similar Threads

  1. How Do I: Make Command Button Use Entry From Text Box.
    By RichardAnderson in forum Forms
    Replies: 1
    Last Post: 07-30-2013, 07:57 AM
  2. Replies: 2
    Last Post: 06-07-2013, 11:07 AM
  3. Populate text boxes with a command button
    By Brian62 in forum Forms
    Replies: 3
    Last Post: 09-30-2011, 12:52 PM
  4. Replies: 1
    Last Post: 09-20-2011, 05:57 AM
  5. Replies: 11
    Last Post: 06-02-2011, 10:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums