Connecting Tech Pros Worldwide Forums | Help | Site Map

Automate the import of a csv file

tjones8611
Guest
 
Posts: n/a
#1: Nov 13 '05
I have an application that updates a CSV file every 10 minutes. I am
trying to use Access to append the information in the csv file to a
table. The csv file does not append the new data, row 1 is just
replaced with the new data every ten minutes. My goal is to capture the
data in the csv file and keep a running log in Access.

I have created a macro I can execute to retrieve the csv data and
append it to a table, works great, now I would like to automate the
macro to run every 10 minutes. Any suggestions?

I might be trying to approach the solution wrong, but a macro was all I
could think of.

Thanks,
Scott


Darryl Kerkeslager
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Automate the import of a csv file


Sub Form_Load()
Me.TimerInterval = 1000*60*10 ' milliseconds*Sec_per_minute*10
End Sub

Sub Form_Timer()
' Retrieve the csv data and append it to a table
End Sub

(See TimerInterval in Help)

Of course, your app must be running with the form open. You should alos
include error_handling, and consider converting from using macros to VBA
code.

Another way might be to link the csv table, since Access can treat a linked
csv pretty much as if it was a table in another mdb.


Darryl Kerkeslager

"tjones8611" <unumpr@bellsouth.net> wrote:[color=blue]
> I have an application that updates a CSV file every 10 minutes. I am
> trying to use Access to append the information in the csv file to a
> table. The csv file does not append the new data, row 1 is just
> replaced with the new data every ten minutes. My goal is to capture the
> data in the csv file and keep a running log in Access.
>
> I have created a macro I can execute to retrieve the csv data and
> append it to a table, works great, now I would like to automate the
> macro to run every 10 minutes. Any suggestions?
>[/color]


Closed Thread