Subject RES: [IBO] Trapping the TAB-key
Author Claudio Kloss
You can use the OnValidateField event of TIB_Query.

Claudio F. Kloss
MicroLight Informatica Ltda.
Juiz de Fora - MG - Brazil

-----Mensagem original-----
De: Freddy Holst Christensen [mailto:freddy_holst_c@...]
Enviada em: quarta-feira, 18 de abril de 2001 07:07
Assunto: Re: [IBO] Trapping the TAB-key

Hello Again NICO

Thanks for the tip, it gave me a starting point..
But there still is a problem , but because KeyPreview works with
keyboard events, and the TAB-key don't generate a
Keyboard event. According to the help-file.

And the database field have an EditMask, and I narrowed it down the the
error aoccuring at dataset-level, when the field
isn't completed. And after trying different dataset event I still wasn't
able to catch the error.

But know I have found a way, with code in a KeyUp-event that work
around the problem.


Nico Callewaert wrote:

> Good morning Freddy,
> First of all, you have to set the KeyPreview property of the form
> True. Then you can write a KeyUp event for the form like this :
> procedure TPurchase_Frm.FormKeyUp(Sender: TObject; var Key: Word;
> Shift: TShiftState);
> begin
> if Key = VK_TAB then
> Key := 0;
> end;
> HTH,
> Nico Callewaert
> ncw@...
> nico.callewaert@...

Your use of Yahoo! Groups is subject to