How can I make a shortcut to a command button where thebutton had no text on it but only a graphic symbol ?
How can I make a shortcut to a command button where thebutton had no text on it but only a graphic symbol ?
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.
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 ?
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.
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?The first method I described must be holdover from Access 2003 or else I just never found that property in 2003 if it existed.
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.
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.
>>>> June7
Thx, it works nicely !
Thanks.
I must have misunderstood this statementI 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.where the button had no text on it
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
it is kind of hidden but accessable through vba e.g.I never knew of any control having a label association as a property
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
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.