Information générale
Catégorie:
Codage, syntaxe et commandes
In a Keypress method of a form I have a case statement like the following (snippet)...
LPARAMETERS nKeyCode, nShiftAltCtrl
DO CASE
CASE nKeyCode = 19 AND nShiftAltCtrl = 2
ThisForm.cmdSave.Click()
NODEFAULT
CASE nKeyCode = 21 AND nShiftAltCtrl = 2
ThisForm.cmdUndo.Click()
NODEFAULT
.
.
.
OTHERWISE
DODEFAULT()
ENDCASE
... which works fine for the keys in the case statement, like Ctrl S for save. However, with this code in use I have two problems:
1. Pressing Tab skips over fields on the form, like every other one. The tab order is set correctly. When I Shift Tab it moves through every field. If I comment out the Keypress code Tab moves through the form perfectly.
2. While tabbing through the fields (skipping like above) I hit an error "Property Value is not found." on some of the combo boxes on the form. The combo boxes are pretty standard, with no unusual code in their methods. Again, if I comment out the Keypress code this error does not appear.
Any ideas on what is going on with this Keypress method? I do not have any code in the Keypress specific to the Tab key.
Thanks.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement