Coding for shortcut keys

R

Rose B

I have an Access application that was written by someone else (in Access
2003) which has a form with various checkboxes on. The checkboxes can be set
to true/false by using some shortcuts - for example Alt + P. The user wants a
new checkbox to be added, with a new shortcut to toggle the setting. The
problem I have is that I cannot see how the shortcut actions have been done!
I can find no customised ribbons, VBA attached to the form and/or controls on
the form, macros etc. etc.

Can anyone help????
 
B

Beetle

If you look at the file extension for the application in question,
is it .mdb or .mde?
 
R

Rose B

mdb - I have full access to the design of the form, and have also searched
through the VBA code
 
P

Peter Hibbs

Rose,

I believe you are describing the built-in short cut facilities of
Access (and every other Windows program for that matter) where the ALT
key can be used as a short-cut operation.

To create a short cut for a control (usually a button) you just
precede the relevant letter in the label with the ampersand character.
So if you have a button (or Check box) which has the caption (or
attached label) showing as, say, Print, if you insert the ampersand
character before the caption text so that it now shows &Print the
letter P will be underlined and when the user presses ALT + P the code
attached to the button will be executed.

If your extra Check box has a label you can just insert the ampersand
before a letter in the label (that has not been used elsewhere on the
form) and then pressing the ALT key plus the letter will toggle the
Check box.

Does that fix the problem?

Peter Hibbs.
 
R

Rose B

Peter, as ever.... you are BRILLIANT!!! I had looked at just about every
property of the form and of the checkbox.... but hadn't thought of looking at
the label! Never come across this before - another one for my tool box.

Thanks,

Rose
 
P

Peter Hibbs

Rose,

Glad to be of help. Just one other point since this facility is new to
you. If you actually want to include the ampersand character in a
label like 'Fish & Chips' for example, you need to double up the
ampersand so that it becomes 'Fish && Chips'.

Also, with regards to the check boxes, your users may or may not know
that if a Check box has the focus you can just press the SPACE BAR to
toggle the Check box.

Peter Hibbs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top