hi guys, How I can assign function keys . Like I want F6 to give me the
today's date in a field.
Alex White MCDBA MCSE - 27 May 2005 19:11 GMT
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyF6 Then
Me.Text1.VALUE = DATE
End If
End Sub
This will do this for the specific field when it has focus
to do this at a form level you need to set the "Key Preview" property for
the form to yes and set the event handler for the form for KeyDown event

Signature
Regards
Alex White MCDBA MCSE
http://www.intralan.co.uk
> hi guys, How I can assign function keys . Like I want F6 to give me the
> today's date in a field.
Wayne Morgan - 27 May 2005 20:13 GMT
Another alternative is to create an AutoKeys macro.
For more information, check this link or the help file.
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/office97/html/m
akingkeyassignments.asp

Signature
Wayne Morgan
MS Access MVP
> hi guys, How I can assign function keys . Like I want F6 to give me the
> today's date in a field.
Van T. Dinh - 28 May 2005 00:50 GMT
BTW, there is an inbuilt shortcut ket for today's date already. It is CTRL +
;

Signature
HTH
Van T. Dinh
MVP (Access)
> hi guys, How I can assign function keys . Like I want F6 to give me the
> today's date in a field.