On Wed, Sep 2, 2009 at 1:04 PM, MB Software Solutions, LLC<[email protected]> wrote: > We've got some phone fields in a table, and I'm grabbing them for > reporting purposes. Some users seem to have keyed in crap though, like > no digits but a dash or parens here and there. I want to NOT grab these > fields, so how best can I basically code (in VFP9SP2) something like this: > > * pseduocode > if DigitsInPhoneField then > grab the field > else > ignore it > endif > > tia! ---------------------------
Don't we all hate to fix data entry screw ups. I guess you have to define what a valid sequence for a Phone # is. (999) 999-9999 (999)999-9999 999.999-9999 Any of the above with" ext." + 99999 and any variety of extension as well. Could you just suck out the non # values and count to see what you are left with? if len = 10 your ok if len = 7 your ok if len = 11 did they put in 1800 or is anything past 10 the extention? Way to much fun here! -- Stephen Russell Sr. Production Systems Programmer SQL Server DBA Web and Winform Development Independent Contractor Memphis TN 901.246-0159 _______________________________________________ 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.

