Building Address Blocks

Catalina

Registered User.
Local time
Today, 13:11
Joined
Feb 9, 2005
Messages
471
My database contains business names and addresses in separate fields (name, address, city, zip code, state, country)

Now I have to build the address block for labels.
If there were just US addresses it would be easy but a business can be located in any country with the problem being
that countries require the block to be build in a specific way (order of city, state, zip code).
In some cases a particular section has to be upper case as well.

Of course I can build it manually in a memo field but the with chance of something easily going wrong I like to automate it.
It does mean the same info will be stored twice which is basically a no no.

I'm thinking of making a separate table with records for all possible layouts and use those as a source for a memo field in
the business table. However I can't oversee if that would work alright or not.
Or should there be a way to generate the blocks on the fly?

Can anyone of you shine a light over this problem? All ideas and comments will be greatly appreciated.

Catalina
 
First thoughts:

How many different Formats do you envision? Can you identify an exact number?
Lots of address labels are all capitals, so maybe ALL CAPs will reduce options.

You could have some sort of function for each of the Formats.
You could even have 1 function with multiple parameters.

I also think there are a number of Address label formats documented somewhere, and these may be useful to you.

I wouldn't consider MANUAL anything at this point. And I would NOT RECOMMEND you do anything in a memo field.

Can you mock up some data and formats and post?
 
Thanks for your input jdraw.

As soon as I get rid of the flu bug I will look into it again, now I only want to sleep. :(

I will follow up on it.

Catalina
 
I had a similar issue with a database i designed some time ago. My solution was a seperate field that specified the format that would be required. The field was based on the format characters used in access (> to go uppercase, ! Force left alignment etc). So i allowed 2 characters per address line and an AddressFormat entry might look like;

..>.* which to my code meant:
. nothing special
> ALL UPPERCASE
* Only if not United Kingdom

Set up a function (mine was triggered in Report OnOpen) to interpret the field and supply the relevant formating.
 
Catalina,

I did some research on the Canadian Postal Guidelines for Addressing Guidelines.(I knew it was out there, just couldn't find it easily)

Here's a link for Canada. There is a spot there for international addresses (I see a title).
http://www.canadapost.ca/tools/pg/manual/PGaddress-e.asp

I'm sure the US and British Postal Service have similar guides.

Good luck.

After posting: I saw Isskint had posted. His comments are very much like I was thinking. A function with some parameters.
 
Thank you both.

I like the idea of a separate field, now I have to figure out how to build the function.

Catalina
 
jdraw,

You recommend not to use a memo field. Is that because of corruption concerns?

Catalina
 
Yes partly because of corruption concerns, but manipulating a memo field would not be my first choice. If you have to store something, I'd use a table.

However, it might be easier if you were to post some sample data records and some of the output issues you foresee. And let a few readers offer some solutions or advice or approaches. It's hard to suggest specifics without seeing
a) the data you are using and
b) the format(s) you want in the address(es).

Good luck with your project
 
Last edited:
Thanks jdraw,

I'm going to fiddle with it some more before I will ask for help again.
Not because I'm stubborn, but finding a good solution myself is a
good exercise in sharpening my skills.

And I will be more proud of it as well. :)

I appreciate your input.

Catalina
 
Fair enough, no one says you have to change your design, it's just that others may want to "give it a go".
Anyway, good luck.
 

Users who are viewing this thread

Back
Top Bottom