Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to setfocus to control with BrokenRule
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00477872
Message ID:
00477939
Views:
27
>Maybe use the description property of the control and walk the list of controls in the form container looking for a match to the broken rule text. If not found setfocus to first field on the form. Perhaps could even use a MsgSvc ckey field as the search parm..
>
>Another thought would be to increase the size of the aBrokenRules array and store a reference to the control in a column of the array. Use it setfocus to the control. However, I think you lose flexibility using this method.

You could include the name of the field where a rule was broken in the Rule's string itself (i.e. "Invalid Date - dTransDate"). That way you could easily implement a method on the form that would parse this for you without the need to modify the BizRules class.

Alex
Low-carb diet not working? Try the Low-food diet instead!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform