Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
In form method always finds a value, correct live
Message
 
 
To
08/09/2006 09:47:42
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01152039
Message ID:
01152255
Views:
15
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
Previous
Reply
Map
View

Click here to load this message in the networking platform