Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field-level rules vs. code in the Valid event
Message
From
01/05/1998 11:21:42
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Field-level rules vs. code in the Valid event
Miscellaneous
Thread ID:
00096287
Message ID:
00096287
Views:
72
I'm still learning the ins and outs of VFP (having recently made the switch from Clipper).

I was just playing around with a textbox control that is bound to a field in a table. I put a field-level rule expression (a UDF actually) in the DBC and noticed that when it fails I get an ugly "stock" VFP error message. So I added my own text in the message box in the DBC. This is better but still not perfect. Then I pondered the possibilty that my validation UDF may actually require different error messages based on the data entered. I took the message out of the DBC and put it in my UDF. Now I'm getting my error and the ugly VFP one. So then I shifted to the Valid event hoping that I could validate using DBGETPROP and retrieving the field-level rule expression. The problem is that it appears the field-level rule is triggered before the textbox's valid.

What should my approach be to this sort of situation?

TIA
Next
Reply
Map
View

Click here to load this message in the networking platform