Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Postal Codes and Input Masks?
Message
From
14/10/2005 14:19:36
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01058828
Message ID:
01059235
Views:
13
Yes, in another system we use two textboxes and place a label of '-' in between. I prefer the single field though with the dangling '-' when the user only enters 5 digits. It reminds them to enter 9 digits if they can. It only appears that way during data entry though because it is stripped off during the report if the value is only 5 digits long.


>Doesn't that look strange to your users when entering only a 5 digit zip. If I'm looking at things correctly this would mean enter a 5 digit zip would look like:
>
32771-
>in the textbox.
>
>Is this correct?
>
>Rodd
>
>>In most cases, it is one field with a format of RZ and an input mask of 99999-9999
>>
>>
>>>Thanks Tracy. What do you guys do for data entry? Do you have your users type the last 4 digits in a separate field or as part of the whole zip? Do you rely on them to enter the - or do you use an imput mask?
>>>
>>>Thanks for your help.
>>>
>>>Rodd
>>>
>>>>We set the display when we print the report:
>>>>
>>>>ag_zip = "99999"
>>>>? IIF(LEN(ALLTRIM(ag_zip)) > 5,TRANSFORM(ag_zip,"@rz 99999-9999"),ag_zip)
>>>>ag_zip = "999991234"
>>>>? IIF(LEN(ALLTRIM(ag_zip)) > 5,TRANSFORM(ag_zip,"@rz 99999-9999"),ag_zip)
>>>>
>>>>
>>>>>Because we deal with so many foreign addresses, we're trying to use input masks for the postal code based on the country. For instance, Canada would have the input mask A9A 9A9.
>>>>>
>>>>>However, I'm stumped as to what to do with US zip codes. A mask of 99999-9999 gives a result of 32771- if the user only enters a 5 digit zip (which we want to allow.) Even if I use the R in the format property, it looks funny on the screen to the user because the dash really isnt' needed unless the last 4 digits are entered.
>>>>>
>>>>>If we use a mask of 99999#9999, we have an entirely new set of problems in that now the - can be substituted with a space or the first of the 4 digit suffix.
>>>>>
>>>>>Is there any way to handle this?
>>>>>
>>>>>Thanks for your help.
>>>>>
>>>>>Rodd
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform