View Full Version : Import file Problem


Haynesey
01-18-2007, 04:12 AM
: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
01-18-2007, 04:29 AM
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
01-18-2007, 05:11 AM
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
01-18-2007, 05:53 AM
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.