[AccessD] KeyCode overview

Gustav Brock gustav at cactus.dk
Thu Jul 8 04:05:52 CDT 2004


Hi Michael

Why not move the key handling to KeyPress? That uses the ascii values.

/gustav


> I would like to trap for pressing certain keys on a specific control on my
> form.
> The KeyDown-Event gives me the keycode, but that keycode does not match
> the ASCII-code of the character.

> E.g. the keycode for the left arrow is 37, but this is the % in ASCII.

> Is there an overview over those keycodes somewhere? The Access Help only
> seems to have a
> list of keycode constants.

> What I am trying to do is this:

> Select case keycode
> case 32 to 126 'These should be all normal printable letters, digits and
> special characters (such as /{( etc.)
>         'Do something
> case else

> end select


> Michael




More information about the AccessD mailing list