Home » Category » Microsoft Windows 2000/NT/2003

Microsoft Windows 2000/NT/2003: ZIP coce validation (was: Digest Number 1729)

118| Sun, 11 May 2008 07:18:00 GMT| richard| Comments (0)
Make sure you are entering the data into a "text" or "string" field -
a "number" field will not work. A "number" field will not allow
leading zeros, but a text field will. The best rule is to use
number fields NLY if you are going to do mathematical calculations
against the field (wages,sales tax, shipping, etc) but if it is a
general number that you will not use in math (Social Security -
great for Primary keys, phone number, or ZIPCode), then use a "text"
data type.

Hope this helps!

Alienwebmaster

In vbhelp (AT) yahoogroups (DOT) com, "HouseDad" <cwcummins...ywrote:

In vbhelp (AT) yahoogroups (DOT) com, "Steve" <sj-steve...pwrote:

Format the cells under "special" and "Zip Code".

Steve,

Thanks a lot for your reply!

This helps save a little time, but doesn't solve my problem,
unless
there's something I am overlooking

For instance, some of the numbers that are in this field are 5
digit
zip codes, some are 9 (ie. 12345-6789), and some of the numbers
are
not zip codes at all that people have goofed up when entering on
the
web form.

If I use "ZIP CDE" formatting, it fixes the problem with the 0's
getting cut off the 5 digit zip codes, but allows a 9 digit zip
codes
missing the first 0 to remain unfixed.

If I use the ZIP CDE + 4 Formatting, it takes a 5 digit zip code
and
right justifies it in the "nnnnn-nnnn" format which isn't correct.

And of course the odd numbers which shouldn't be there can be
passed
as a valid zip code with the formatting and the customer doesn't
like
sending bad addresses to the printer.

I receive the data correct, with the 0's in the right place, and
am
only losing it in Excel. If I could sort the csv file or read the
records in a sorted order for processing then my program would
accurately pull bad zip codes that are too short while allowing
the
correct ones to pass

Thanks for any input you might have!

[C]

Yahoo! Groups Sponsor
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page

'//
Rules :
Home :

Post : vbHelp (AT) yahoogroups (DOT) com
Join : vbHelp-subscribe (AT) yahoogroups (DOT) com
Leave : vbHelp-unsubscribe (AT) yahoogroups (DOT) com
'//

Yahoo! Groups Links

<*To visit your group on the web, go to:

<*To unsubscribe from this group, send an email to:
vbhelp-unsubscribe (AT) yahoogroups (DOT) com

<*Your use of Yahoo! Groups is subject to:

Keywords & Tags: zip, coce, validation, digest, number, 1729, microsoft, windows 2000, nt, 2003

URL: http://www.msdns.org/windows-2000-nt/300505/
 
«« Prev - Next »» 0 helpful answers below.

Microsoft Windows 2000/NT/2003 Hot Answers

Microsoft Windows 2000/NT/2003 New questions

Microsoft Windows 2000/NT/2003 Related Categories