Ah, right, I went back and re-read your OP I missed the property page part.
No, it's not possible.
Think of the property page as being a higher level than the procedure, at
the property page level you can choose to
a) run a specific function
b) build an expression
c) execute the appropriate event for the control
These are three distinct choices, the KeyAscii value of the key pressed is
only exposed in the event.
--
Terry Kreft
MVP Microsoft Access
"laurenq uantrell" <la*************@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Terry,
Thanks for the reply.
I was hoping there is a way to crack what seems to be built-in
functions in Access that expose the KeyAscii value and other values
that reveal themselves only when exposed through the event procedure.
lq
Terry Kreft wrote: If RunSomeOtherFunction is declared as shown below in a module then
you can run it from the immediate window like this
?RunSomeOtherFunction(Asc("A"))
Where Asc is a function which returns the ASCII value of the first
character in the string passed to it.
--
Terry Kreft
MVP Microsoft Access
"laurenq uantrell" <la*************@hotmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com... In a field's OnKeyPress properties I can execute code that reveals the Ascii key that is pressed:
On Key Press: [Event Procedure]
Private Sub FieldName_KeyPress(KeyAscii As Integer)
Dim x as Integer
If KeyAscii = x then Call RunSomeFunction
End Sub
Is it possible to do the same if I call the function from the property window of the control:
On Key Press: =RunSomeOtherFunction(???KeyAscii???)
Function RunSomeOtherFunction(KeyAscii As Integer)
Dim x as Integer
If KeyAscii = x then
call RunSomeExcitingCode
End If
End Function