Results 1 to 10 of 10
  1. #1
    ksor's Avatar
    ksor is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2017
    Posts
    126

    Shortcut to graphic symbol ??


    How can I make a shortcut to a command button where thebutton had no text on it but only a graphic symbol ?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    You mean the shortcut defined with & character? Can have an associated Label and that Label can have the shortcut.
    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.

  3. #3
    ksor's Avatar
    ksor is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2017
    Posts
    126
    Yes and no ... a commend button can have TEXT or a GRAPHIC symbol - if it has text you can add this "&" in front of the letter you want to use as a shortcut to clicking on that button.

    I want the same facility for a button with a graphic symbol - I would like to define a shortcut key to clicking on that button !

    - but how ?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Actually, it is possible in Access 2010 to have graphic with shortcut text.

    Set the PictureCaptionArrangement property and then put whatever you want in the Caption property.

    The first method I described must be holdover from Access 2003 because I thought that was the only way to accomplish but if the PictureCaptionArrangement existed back then I just didn't find it.
    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
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    The first method I described must be holdover from Access 2003 or else I just never found that property in 2003 if it existed.
    I never knew of any control having a label association as a property. At least, I don't ever recall seeing it in the property sheet anywhere, as a property. Is it one of the hidden properties?

    Anyway, you can create a label, select and cut it, then select a command button and paste the label back. It will "associate" with the button, and the label click event will transpose to the button click event (the label click event won't run at all - cannot say what happens to any other label event). Thus the label shortcut becomes the button shortcut. Works even if the label is not visible. Not sure how you inform other users that Shift+x will 'click' the button if the button has no text or the label isn't visible. Maybe that's why they introduced the ability to have text and button images at the same time.
    Last edited by Micron; 05-21-2017 at 02:59 PM. Reason: grammar
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    That is how I associate label with button. The property I meant to reference that I might not have found if it existed in 2003 is PictureCaptionArrangement. Edited my earlier post to make that clear.
    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.

  7. #7
    ksor's Avatar
    ksor is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2017
    Posts
    126
    >>>> June7

    Thx, it works nicely !

  8. #8
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Thanks.
    I must have misunderstood this statement
    where the button had no text on it
    I would use the same property as you as long as I was OK with having text with an image. If I said the button must not have text, then I guess not.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  9. #9
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    I never knew of any control having a label association as a property
    it is kind of hidden but accessable through vba e.g.

    labelname=label1
    textbox=text1

    vba

    debug.print text1.controls(0).name

    will produce label1

    you can't add additional controls to that collection - and if the control does not have a label it will generate an 'object doesn't exist' error

  10. #10
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I use that to get a meaningful field name when prompting for missing information. A label caption like "Work Order No:" looks better than "txtWoNo" in a message.
    I'm not sure I'd agree that it's a property, and in my statement, I'm being very literal I'll admit. I consider it a member of a collection that only exists if the label is "attached".
    You are quite correct regarding your last sentence.

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

Similar Threads

  1. Shrinking a button with a graphic
    By Donatello in forum Access
    Replies: 0
    Last Post: 06-09-2016, 12:13 PM
  2. Pagination graphic report in vba access
    By Pietro75 in forum Programming
    Replies: 2
    Last Post: 02-09-2015, 02:45 PM
  3. modify ms-chart graphic legend
    By chrtophe in forum Reports
    Replies: 9
    Last Post: 11-25-2013, 02:52 PM
  4. Graphic problem!
    By Biel in forum Access
    Replies: 3
    Last Post: 10-25-2011, 03:34 PM
  5. Graphic fields
    By modlrfleck in forum Access
    Replies: 2
    Last Post: 02-03-2010, 11:15 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