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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Keys

Status
Not open for further replies.

CHTHOMAS

Programmer
Jun 16, 1999
106
AE
Is there any way that when i press a function key, a particular control on the form has to get the focus. Eg. when i press F1 the focus has to be on field1, F2 the focus on field2 etc. Any solutions or suggestions will be greately appreciated.<br>
Thanks in advance<br>
Charley
 
If you want to use AutoKey feature you have to do a macro where you define keys and a module with functions which will set the focus:<br>
<br>
Go to Modules and create new module and insert functions needed i.e.<br>
<br>
Function MoveToField1()<br>
Forms!YourForm.[Field1].SetFocus<br>
End Function<br>
<br>
1. Go to macros and create and save a new macro called AutoKeys<br>
2. In this macro insert keys in 'Macro name' column i.e. {F1}<br>
3. For each macro row choose action RunCode and appropriate function<br>
<br>
As said in Access Help, this replaces the normal key behaviour in every form and report. Not very useful if you have many forms.<br>
<br>
Al
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top