Canceling OnKeyUp Event within a module



All,

I was wondering if someone might be able to help me figure out how to cancel the onKeyUp action if the current key being pressed is the tab key.

I realize this syntax is not correct but it will give you an idea of what I'm looking to do

Private Sub Field_Enter()

If Me.OnKeyUp = TabKey then ' I'm need to test to see if the key being pressed is the tab key
' if the current key being pressed use the tab key I want to suppress the onKeyUp event

Cancel on key up event (will not fire) 'if the tab key is the key pressed being pressed then I don't want the event to fire.

End if

Me.Field.DoSomething

End Sub

The problem that I am running into is that, the OnKeyUp event is interfering with some work that I need to do wen the focus changes to the current field. I'm running into the same problem when I use either the onFocus or onEnter events.

Thanks in advance. - CES
.



Relevant Pages

  • Outlook 2003 Weird Happening...
    ... Something goofy is going on with my Outlook 2003. ... Now, for some reason, WHENEVER I hit the TAB KEY, a window pops up. ... If you cancel etc. etc " ...
    (microsoft.public.office.misc)
  • Re: Outlook 2003 Weird Happening...
    ... > | Now, for some reason, WHENEVER I hit the TAB KEY, a window pops up. ... > | entry boxes for the country/region I am in, area code, carrier code ... > | Then it won't cancel. ...
    (microsoft.public.office.misc)
  • Re: Capture F5 Keystroke
    ... Key is passed to the OnKeyUp, OnKeyDown, etc. events. ... >secondly when the users closes the app clicking the x in the top right, ... >but not sure how to cancel the terminate. ...
    (borland.public.delphi.language.objectpascal)
  • Re: Capture F5 Keystroke
    ... > Donlad wrote: ... > Key is passed to the OnKeyUp, OnKeyDown, etc. events. ... >>but not sure how to cancel the terminate. ...
    (borland.public.delphi.language.objectpascal)