Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
In form method always finds a value, correct live
Message
 
 
À
08/09/2006 09:47:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01152039
Message ID:
01152255
Vues:
16
I'm not sure there is alternative approach, unfortunately. But calling one object SetFocus from another GotFocus messes up the event sequence. At least add nodefault in GotFocus then.

>>>>
>>>>llfound = INDEXSEEK(lccid)
>>>>
>>>>IF llFound AND lcCID <> gCID
>>>>	=msgfrm(SPACE(4) + 'User ID ' + lcCID + ' already exists.' + ;
>>>>		CHR(10) + SPACE(10) + 'Re-enter or Revert.' ;
>>>>		,'0',,'S','Existing field value',0,gnMsgWait)
>>>>	KEYBOARD '{LEFTARROW}'
>>>>	RETURN
>>>>ENDIF
>>>>
>>>>I used debug to see the values
>>>Sorry
>>>
KEYBOARD '{LEFTARROW}' should be Thisform.CID1.Setfocus
>>
>>Calling SetFocus from another control GotFocus doesn't look kosher to me.
>I used it because it worked, is there a reason not to use it?
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform