Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another *Valid* Problem using an .EXE
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00453106
Message ID:
00453312
Views:
20
>>I have code which runs from textbox valid methods which do not fire consistently in the EXE, but they do work fine in the development environment.
>>
>>During the first use of the form, when I press Enter the focus moves to the next textbox, but does not fire the valid. Then, usually if I go back and edit the value and press Enter the valid does fire. Yet, it is not consistent. But, once it does fire, it keeps firing after that.
>>
>>Is this a problem with VFP 5.0? Or does it occur in 6.0 and beyond as well?
>>
>>I checked the Microsoft VFP knowledgebase on this and found nothing of value. Anyone have any helpful advice?
>>
>>Steve
>
>Valid will only fire if you've changed the value in the field. Could that be the problem?

It is incorrect. For textbox, for example, Valid fired each time you lose focus. In my base text box class I put code (if this.Value<> this.OldVal ...) just to prevent this functionality and run validation only when value changed.

However, from the common sense view, you're correct - it will be very good if we will have evebt that fires only when value really changed, but not for each character, but when losing focus.

Steven, how you managed to use Enter key to move to another control? If you do this from KeyPress event of control - here might be a problem. In my application when I use TAB key to move to other control, everything works very well.

Finally, check if empty value in the textbox is not a NULL value in the field. I encountered really weird behaviour of some VFP controls when field value is NULL, that required some workarounds.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform