[AccessD] Zip code format

Bob Gajewski rbgajewski at adelphia.net
Mon Jul 11 23:56:00 CDT 2005


Kathryn

How about this?

=[City] & " " & [St] & " " & IIf([Zip]<99999,Left$([Zip],5),Left$([Zip],5) &
"-" & Right$([Zip],4))

Regards,
Bob Gajewski
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kathryn Bassett
Sent: Tuesday, July 12, 2005 00:43 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Zip code format

It's only the report I'm having a problem. The box is

=Trim([City] & " " & [St] & " " & [Zip])

But the Zip is leaving out the hyphen. Hmm, just realized, the hyphen isn't
really there, that's just the mask. I think I'll take the easy way out and
just make two fields for the zip. And yeah, I use the +four as much as
possible. Personal experimentation has proved that it does make a difference
in the speed with which it is delivered. 

--
Kathryn Rhinehart Bassett (Pasadena CA)
"Genealogy is my bag" "GH is my soap"
kathryn at bassett.net
http://bassett.net    

> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan 
> Harkins
> Sent: 11 Jul 2005 8:56 pm
> To: 'Access Developers discussion and problem solving'
> Subject: RE: [AccessD] Zip code format
> 
> Kathryn, there's no built-in way to handle this -- you have a couple 
> of options.
> 
> Store the - in the table with the data by changing the format code to 
> 00000\-9999;0; -- that last 0 stores formatting with the data.
> 
> Then, you can base the report on a query and use the following 
> expression to get rid of the -
> 
> FormattedZIP: Iif(Len(ZIPCODE) = 6, Left(ZIPCODE,5), ZIPCODE)
> 
> If you don't want to store the - in the data, then you'll need an 
> expression that handles putting it in instead of taking it out. I 
> don't have that off the top of my head -- but I could come up with it.
> 
> This really shouldn't be so hard -- maybe someone has a simpler 
> solution.
> 
> My solution has to always just omit the last four digits -- I don't 
> know any po that actually requires them. :) Am I wrong on that? Maybe 
> you need them if you're using bulk mail or something.
> 
> Susan H. 
> 
> In my table (members), I have a text field called Zip. The input mask 
> is 00000\-9999;;_
> 
> Some people I have the 5 digit code, and others the zip+4, so this 
> works.
> When I look at a query, a person's zip will show up as 91502- or 
> 91006-2046 as I expect. However, when I make the mailing labels, I get 
> 910062046 instead of 91006-2046. The 91502- does correctly show as 
> 91502 without the dash.
> 
> In the table field definition, there is a space for "format" 
> but if I put the same _ I still get same result. There is no 
> "predefined format" in the drop down box.
> 
> What do I do? This is a flat database with only 28 records, so I've 
> got some play leeway.
> 
> --
> Kathryn Rhinehart Bassett (Pasadena CA) "Genealogy is my bag" "GH is 
> my soap"
> kathryn at bassett.net
> http://bassett.net   
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list