Link to home
Start Free TrialLog in
Avatar of lolekbolek
lolekbolek

asked on

batch import data from txt to a MS Access 2007 field

I have a MS Access 2007 database with a list of thousands of people, that includes their id number, name, status, link to photo file location, etc.  I took a couple hundred pictures that had to wait to be entered into the "photo" field, because I had no id numbers for them at the moment.  Now, I do have a txt file with a list of a couple hundred files that are named after their id numbers.  It looks like this:

007733.jpg
007755.jpg
008010.jpg
etc.

What I want to do is follow a few steps in Access 2007 (compacted into a macro or a couple of functions) that would:

1. read the txt file
2. find an entry for each id number listed, by taking, say, 007733 out of 007733.jpg and looking it up in the "idnumber" column
3. update those couple hundreds of entries so that, for instance, an entry with 007733 in the "idnumber" column it would have: N:\photos\007733.jpg in the "photo column

You suggestions are most welcome!
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lolekbolek
lolekbolek

ASKER

Thank you, Scott.  I usually never have to work with Access, so if you could give me an idea of what the "immediate window" means or how to run your code from it (i.e., what menu options or toolbar buttons to use before getting to a place where I can paste the code), that would be peachy.
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: Scott McDaniel (Microsoft Access MVP - EE MVE ) (http:#a40200809)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

MacroShadow
Experts-Exchange Cleanup Volunteer