Post code input mask (1 Viewer)

MD69

New member
Local time
Today, 03:16
Joined
Feb 28, 2013
Messages
5
I use the Microsoft-supplied Orders database for a small business I run. Because I'm in the UK, I've had to amend certain fields within the tables, forms, reports etc to accept UK-style data. I've just come across one issue though that I'm struggling with.

In the "Customer" table, the post code mask I've been using is >LL0\ 0LL - for those not aware, the usual format is (A = alpha, N = numeric) AAN space NAA. The format after the space never changes, but the format before it can. It can be AANA or AANN. The majority of my customers are AAN space but today I've got one which is AANN space.

Changing the mask to >LL00\ 0LL works fine - for this customer. However, it's changed the format of all other customers. E.g. my main customer's post code is AA1 1AA, but after changing the mask, it's showing as AA11 AA. How do I get it to display AA1 1AA again, whilst showing my new customer as AA11 1AA?

Also, on the "Invoice" report form, the same problem arises.In the "Bill to" & "Ship to" address fields, the Properties for these show as =[City] & ", " & [StateOrProvince] & " " & Format([PostalCode],"!&&& &&&&"). I tried adding an extra "&" in the group of 3, but I end up with the same problem as above.

Any ideas as to how I can satisfy all formats in all forms/tables etc without having to amend the properties each time I use a different customer?
 

Simon_MT

Registered User.
Local time
Today, 03:16
Joined
Feb 26, 2007
Messages
2,177
There are different Input Masks for UK Postcodes:

E2 5BN >L0\ 0LL;;
E12 5BN >L00\ 0LL;;
EC2 5BN >LL0\ 0LL;;
EC12 5BN >LL00\ 0LL;;
EC2A 5BN >LL0L\ 0LL;0;

I use a table with a dropdown list and AfterUpdate set the Input Mask for the Postcode Field. This is on a Form.

Simon
 

MD69

New member
Local time
Today, 03:16
Joined
Feb 28, 2013
Messages
5
There are different Input Masks for UK Postcodes:

E2 5BN >L0\ 0LL;;
E12 5BN >L00\ 0LL;;
EC2 5BN >LL0\ 0LL;;
EC12 5BN >LL00\ 0LL;;
EC2A 5BN >LL0L\ 0LL;0;

I use a table with a dropdown list and AfterUpdate set the Input Mask for the Postcode Field. This is on a Form.

Simon

Thanks Simon - I'd forgotten about the E2... format.

I'm not overly familiar with what you propose there. What I'd ideally like is for the mask to be global so that I don't have to amend it for each customer input or invoice generated. Can you talk me through a step by step method of what you've done? Sorry if I sound a bit, er, thick..
 

Simon_MT

Registered User.
Local time
Today, 03:16
Joined
Feb 26, 2007
Messages
2,177
I can't think of a global solution. within Europe the Postcode comes before the Town. The US the traditonal ZIP code was not big enough so the new postcodes have been expanded.

I have attached an example that you can work through. This is a fraction of a major application so I that had to strip out the relevant sections.

Simon
 

Attachments

  • Postcodes.accdb
    436 KB · Views: 293

Users who are viewing this thread

Top Bottom