Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

last key pressed? 1

Status
Not open for further replies.

ronphx

Programmer
Jun 24, 2004
64
US
Is there a built in function in Access that will give the last keystroke pressed? I know there are key down and key press events, but I was wondering if there was a built-in function that you could use anywhere in code. dBase had a function called LASTKEY() which would always return the last key pressed.

Thanks.
 
What are you trying to accomplish with this sort of function? If we knew, we might be able to help you better identify a solution...
 
Good question. In the past I've asked users to press a certain key (like the F5 or F6 key) to acknowledge that they have in fact read an important message instead of just pressing the enter key to continue. It really isn't terribly difficult to build in a test in Access using the Keypress functions, but I was just wondering if Access had it built in.

Thanks for asking.
 
Essentially, yes. I probably could use an input box also and test for the answer.
 
I have not been able to find an answer. If it were me, I would create a new form with your message. You could even set the openargs to the special message given. Then test for the key pressed within that form.

Sorry I couldn't be of more help. Good luck!!
 
Actually, you helped me a great deal. When you asked me the question regarding what I was trying to accomplish with the function, it made me realize my procedures under dBase were not appropriate at all under Access. I think the form with the openargs is going to be the way I'll go on this.

Thanks for taking the time. I appreciate it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top