By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,688 Members | 1,845 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,688 IT Pros & Developers. It's quick & easy.

When tab key is pressed, can I detect the current field?

P: 99
I want my user to be able to tab through fields on a form, but NOT move to a new record when tabbing gets to the last tab-indexed field. I can detect when tab is pressed within the KeyDown sub, but I don't know how to pick up when the last tab-indexed field has been reached, or how to set the tabbing back to '1' again at that point. Can anyone help?
Sep 22 '10 #1

✓ answered by TheSmileyCoder

You could write code to detect which field is the active control, but in your case, the easy solution is to look at the properties of your form, find the property called Cycle, and change it from All Records to Current Records, and you should now only cycle the current record when tabbing through.
Note: This is for Ac2007, may be slightly different in earlier versions but I know its there.

Share this Question
Share on Google+
2 Replies


TheSmileyCoder
Expert Mod 100+
P: 2,321
You could write code to detect which field is the active control, but in your case, the easy solution is to look at the properties of your form, find the property called Cycle, and change it from All Records to Current Records, and you should now only cycle the current record when tabbing through.
Note: This is for Ac2007, may be slightly different in earlier versions but I know its there.
Sep 22 '10 #2

P: 99
Thanks lots, that's great. Hope I haven't sent two thankyous by mistake: I stopped to click best answer while replying and I think my reply disappeared! Anyway, you deserve at least two thankyous.
Sep 22 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.