Link between Tables

rob_andy

New Member
Joined
Mar 12, 2003
Messages
33
I've got a table that contains the first letters of a postcode e.g. S or LN, also stored is city/town e.g. Sheffield or Lincoln and finally area. So basically its a very simple postcode lookup table. I want to link this to my customer files that have postcodes, however the postcodes in the customer files are in normal format e.g. LN4 3RN, so I only really need the first 1 or 2 characters. To link the fields.

Idea, create a new column in customer table and some how (the bit I need help with) automatically transfer the first letters of the full postcode into this column and apply to all those already in and future entries into the table. Thanks for any help, much appreciated. Rob
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
When you look at what you're trying to do, you realize that you're basically trying to Calculate a field based off of pre-existing data. As almost always is the case with Access, calculated fields should be calculated in queries and not stored in the underlying tables. So create a query which will grab all of the fields that you need from your customer table. Add a new field in the query and as its name write:
Code:
Left([Your_Post_Code_Field], 2)
which will give you the first two characters of the postal code. You can then create another query which joins this query to the lookup post code table on the calculated post code field.
 
Upvote 0

Forum statistics

Threads
1,221,547
Messages
6,160,456
Members
451,647
Latest member
Tdeulkar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top