Auto-schedule Data loading process

  • Thread starter Thread starter michael lam
  • Start date Start date
M

michael lam

Hi, I have a question on data uploading process.

In fact, on a daily basis, a csv file (same file name) is generated from a
data vendor and automaticallly put into a public folder. Then, the file
will be loaded into Access.

Currently, the loading process is done manually. Is it possible to schedule
the uploading process so that it can be done automatically behind the scene?

Thank you very much for your help!

Regards,
Michael
 
Sure, you can write a windows script, such as

dim accessApp

msgbox "Click ok to run batch job",64

set accessApp = createObject("Access.Application")

accessApp.OpenCurrentDataBase("C:\Documents and Settings\Albert\My
Documents\Access\ScriptExample\MultiSelect.mdb")

accessApp.Run "TimeUpDate"

accessApp.Quit

set accessApp = nothing

msgbox "Job complete", 64

You can type the above into a text file (note pad). Then, rename the
extension to .vbs. (note how the icon changes...you can now double click on
this icon to run the script). The above example will run a public sub called
TimeUpDate in a standard module. Of course, after you get your script
working, you would remove the msgbox commands. Then, you simply use the
windows scheduler to run the above script once a day.....
 
Hi Albert,

Thank you very much for your help! Really appreciate it.

Regards,
Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top