In MSDN I found something under "ToolsCustomizeKeyboard" which is actually a function in VB. It lists the value of F1 as 112.
From help:
Syntax
Private Sub Form_KeyPress(KeyAscii As Integer) or Private Sub controlname_KeyPress(KeyAscii As Integer)
KeyAscii
Returns a numeric ANSI key code. The KeyAscii argument is passed by reference; changing it sends a different character to the object. Changing the KeyAscii argument to 0 cancels the keystroke so that the object doesn’t recognize that a key was pressed.
You can convert the KeyAscii argument to a character by using the following expression.
Chr(KeyAscii)
You can then perform string operations and translate the character back to an ANSI number that the control can recognize by using the following syntax.
KeyAscii = Asc(character)
So, if I read this correctly, your statement would be something like:
OnKeyPress
If KeyAscii = 112 then
MyProcedure
End If
Matt