Processing on Keystroke

S

Sharkbyte

I have an application where there is a need to input a large string of single
alpha characters. Is it possible to get Access to process on the keystroke,
while still capturing the keystroke?

I have tried both KeyPress and KeyDown, and both process on the action, but
the text box does not display/retain the value of the key. It is either Null
or "". And AfterUpdate requires a second keystroke to fire.

Any help is appreciated.

Sharkbyte
 
A

Allen Browne

Try the control's Change event.

Be sure to examine the Text property of the control. Its Value is not up to
date yet.

KeyDown and KeyPress are too early: the keystroke has not been added to the
Text yet.
 
À

ÀÌÈ¿Á¤

Sharkbyte said:
I have an application where there is a need to input a large string of
single
alpha characters. Is it possible to get Access to process on the
keystroke,
while still capturing the keystroke?

I have tried both KeyPress and KeyDown, and both process on the action,
but
the text box does not display/retain the value of the key. It is either
Null
or "". And AfterUpdate requires a second keystroke to fire.

Any help is appreciated.

Sharkbyte
 
S

Sharkbyte

Thanks Allen. That worked, with one small change. I had to change focus,
execute the code, then return focus to the control. The change of focus
stores the keystroke value, allowing it to be processed before moving on the
the next entry.

Thanks for the help.

Sharkbyte
 

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