Need help representing the Alt key

B

BobV

Group:

I would like to make a macro that responds when Alt+C is pressed. However,
when I try to save the macro I get an error message telling me that I am not
using the correct syntax. I am trying to use %C to represent pressing the
Alt key and the letter C. What am I doing wrong?

Thanks,
BobV
 
G

GVaught

I don't believe Alt is a choice in Access. You can use Ctrl(^); Shift (+);
or {f1}
Do a search in help on Autokeys.
 
M

M.L. Sco Scofield

The AutoKeys macro does not recognize all of the special keys that you can
specify with SendKeys.

You will only be able to intercept this key combination on a form-by-form
basis. First you need to set the form's Key Preview property to Yes. Then
you need to use the form's KeyDown event. The KeyCode argument will give you
the key that was pressed and the Shift argument will give you what
combination of the SHIFT, CTRL, and ALT keys are being held down.

Look up "KeyDown, KeyUp Events"and "KeyDown, KeyUp Events - Event
Procedures" in the help file.

Good luck.

--

Sco

M.L. "Sco" Scofield, MCSD, MCP, MSS, Access MVP, A+
Useful Metric Conversion #16 of 19: 2 monograms = 1 diagram
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 

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