Import file Problem (1 Viewer)

Haynesey

Registered User.
Local time
Today, 15:49
Joined
Dec 19, 2001
Messages
190
:mad: Hi,

I m really struggling now with this problem.

I am importing a csv file with addresses and Post Codes on into a Properties Table. However, when I import the csv file, there is another field in the table called Area. I want the import routine to somehow use a lookup table that will contain all Post Codes and what Area they are in and then insert the relevant Area in each record in the properties table. I have tried using DLOOKUP in an update query but this just inserts the first Area in the lookup table into all records in the Property Table.

Any help would be much appreciated.

Lee
 

Bat17

Registered User.
Local time
Today, 15:49
Joined
Sep 24, 2004
Messages
1,687
link the 2 table together in the update query and just drop in the relevant fields.
Better yet, don't bother! just link the lookup table to the main table in a normal query and use that to base your forms/reports on. When the post offfice decides to change their postcodes you just need to update the look up table and not have to chase around trying to find what has changed!
That is the beauty of a relational DB :)

Peter
 

Haynesey

Registered User.
Local time
Today, 15:49
Joined
Dec 19, 2001
Messages
190
Thanks

Hi,

Thanks for this.

At the moment however, ther are no forms. I am just updating the data in a table. Is it not possible without forms?

Cheers

Lee
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 09:49
Joined
Feb 28, 2001
Messages
27,175
It is very possible without forms.

Don't ever do a DLookup from an already-resident table if a JOIN is possible. Saves storage time and is dynamic - in case something gets redesignated via a new area name or a change of post-code boundaries.
 

Users who are viewing this thread

Top Bottom