Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validation Techniques
Message
From
02/08/2001 15:41:34
 
 
To
02/08/2001 15:07:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00539007
Message ID:
00539053
Views:
12
>The form that is brought up has a complex price code selection criteria and displays other related info. Anyway, it still does not solve the problem of skipping the validation routine. I may be trying to press another selection button or just trying to go to a prior field from the pricecode textbox.
>

I have not been able to come up with a workaround for this problem, besides doing what Sergey has suggested...validating the data when before it is saved to the table.

What I have done, to give the user a clue that there is a problem, is I put the textbox, the lookup button (I use an icon), and a text description field in a container. In the container LOSTFOCUS() method, the underlying table is queried. If the foreign key is found, the text description field is filled in appropriatley. If it is not found, a message (such as "Customer Not Found") is put in the description field.

This is all done as part of a custom container class, so I can just drop it on a form and go. On of the properties of the class is the name of the lookup form, so when the lookup button is pressed, it knows what to do.

I'm not sure if I have described it as best as possible. Hopefully you can glean an idea or two...
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform