Address formats


Addresses are a very personal thing. People get upset if you change the way that they like to see their address written. Despite this, you as a developer have to take a stand and force addresses into a consistent format if you are to stand any chance of processing them automatically.

Our format

We use the following layouts for all UK addresses:

Address1 C 30
Address2 C 30
Town     C 30
County   C 30
Postcode C  8

Restricting the size of the address may seem draconian but we've spent fifteen years using this format. All our customers' addresses have been made to fit it.

If you feel that you do need longer fields, think about whether the extra text will fit on a label or be visible through a window envelope. Standard Avery L7163 labels or DL window envelopes will take the person's name plus these five lines in 10 point Arial.

Don't even think of using 8 point Arial Narrow to fit more characters and lines on the paper.

Our rules

We apply the following rules to keep entries consistent:
  • Omit all punctuation.
  • Address1 and Address2 are free-format but the Town, County, and PostCode fields hold nothing but those values.
  • Abbreviate 'Road', 'Street', etc.
  • Omit the house name if there's a number as well.
  • Spell towns in upper case.
  • Spell counties in full.
  • Omit the county for county towns (eg Worcester, Warwick).
  • Omit the county for post towns (eg Bath, Coventry).
  • Omit country names within the UK.
Some of these rules date from the days when we produced label runs on a dot matrix printer. We did everything we could to reduce the number of characters to be printed. Every character that we could take out of the address made the four hour print run just a little bit faster and (what was more important) just a little bit quieter.

Other hints

  • Use meaningful field names. Generic names like 'Address1 .. 6' will confuse you when you are coding.
  • Label every line of the address on the data entry form so that the user knows what goes where.
  • Suppress blank lines when you are printing the address on labels or letters. If you print blank lines then the user is tempted to correct your 'mistake' by putting Town in the Address2 field or Postcode in County.
  • Consider an addressing tool to give addresses from postcodes. We use Quick Address from http://www.qas.com
  • Validate the postcode format - at least check that it's a valid combination of upper-case letters and numerals.
  • Give the user a combo box for the County field.
  • Make the Address1 and Town fields mandatory.
All this applies to UK addresses, some countries have addresses that are easier to process, others are more difficult. There's a wide selection of international address formats on: http://www.bitboost.com/ref/international-address-formats.html

Hints & tips

The textbox class in Visual FoxPro 9 has a new Autocomplete property which shows the user the previous values that have been entered in that textbox.
Autocomplete in VFP 9

Your Access database will look more impressive if you add custom toolbars...
Custom toolbars

FoxPro has always had functions to read and write files at a low level...
Foxpro low level file functions

More...
More pages of hints and tips for users of Microsoft FoxPro and Access databases.

Site Map