Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Update table from data in csv file

Update table from data in csv file

Update table from data in csv file

Hello all,

I have a table with client transaction information and a check box to mark whether it has been sent to a different department for processing. Once processed, the other department sends me a csv file with all the transactions it has processed successfully (some don't get processed due to errors). This csv file contains a unique identifier for each transaction. For now, I've been manually checking off each successful transaction but I'd like to be able to do it automatically. Can someone provide code to read the csv file line by line and update my table accordingly? Thank you.


RE: Update table from data in csv file

You should able to link to the CSV file. At the top select External data tab and "Import/link". Pick text file. You can then run an update query from the linked or imported csv file.

RE: Update table from data in csv file

Thanks for the speedy reply. The csv filename changes every time though.
I can code the exact path and filename if that helps.

RE: Update table from data in csv file

If you link the CSV file it appears as a table. You can give the table any name, and use that in a query. When the next file comes in. Update the link to the new file, and keep the same name. That way the query will use the new file without modification

RE: Update table from data in csv file

Sounding better. Can I update the link to the new file using code or do I have to do it manually through the menu?

RE: Update table from data in csv file

Actually, I have a better idea. I will write code to rename the csv file so the link doesn't need to be updated. Of course, I will copy the original filename to an archive folder first. Will let you know how it turns out, thanks!

RE: Update table from data in csv file

Hey MajP, forgot to get back to you earlier but just wanted to let you know it's done and works like a charm. Thanks very much for your help!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close