Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How do I import a csv file into Access 2007 daily via scheduled tasks?

Posted on 2009-12-28
Medium Priority
Last Modified: 2013-12-05
I would like to setup a daily import of a .csv file containing weather data into an access table via scheduled tasks. The data would be appended to an existing table and if possible i would like any duplicate rows to be removed. I can do the process manually and have saved the process.  I don't have much experience  with vb so any pointers would be appreciated.
Question by:plewk
  • 2
LVL 85

Accepted Solution

Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 100 total points
ID: 26137011
Appending a CSV is pretty straight forward, but removing duplicate rows can be complicated - what exactly do you consider to be a "duplicate" row? Which columns would have to be identical in order for it to be duplicated?

To import, you can build a macro which does this for you ... the wizards are pretty good at this, so you should be able to do this easily.

Once you've got your macro working, you can then use a Scheduled Task to call your Access database with the macro:

"full path to msaccess.exe" /x "Macro Name"

This will open Access and run the macro specified.
LVL 28

Assisted Solution

TextReport earned 100 total points
ID: 26142063
Hi LSMConsulting, just to say you forgot the database in the command.

"full path to msaccess.exe" "FullPath and Database Name" /x "Macro Name"


"C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE" "C:\My Data\MyDatabase.MDB" /x "My Macro Name"

Cheers, Andrew
LVL 85
ID: 26142419
Thanks Andrew!

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question