Ken Dibble wrote: >> I have a form with a bunch of text boxes >> It has 2 command buttons, OK and CANCEL >> >> One of the TEXT boxes has a valid condition that says "Sorry, Reference may >> not be left blank" >> My client says, Hang on, I just clicked the Cancel button, I don't want to >> enter a Reference >> But I can't find a way to do this. >> >> (Should I remove the valid clause and make it part of the OK command?) > > Ideally you would have a method that contains all the validation code for > all of the data that gets entered when the user presses the OK button. In > fact, that validation code would ideally reside in a nonvisual object that > can be called from your form (so if, in the future, you need to handle that > data in a different form or a different application, you don't have to > rewrite the code). > > This is, of course, harder to do if you use the native databinding in VFP > forms, but it can still be done.
Ditto what Ken said. This is why I like to use OBJECTS and not Table.Field references in my record editing screens. -- Mike Babcock, MCP MB Software Solutions, LLC President, Chief Software Architect http://mbsoftwaresolutions.com http://fabmate.com http://twitter.com/mbabcock16 _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

