Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run VB code daily to export table data 2

Status
Not open for further replies.

cdgeer

IS-IT--Management
Apr 8, 2008
133
US
Hello, I'm trying to figure out the syntax (especially the date part) to run a DoCmd.Export "TableName" on an automatic daily basis (just once each day).
I basically want to send an extract to a shared folder every day.

Could anyone give me some pointers? Thank you
 



hi,

Why would you export all the data in a table? Can't the users of this data access your table directly?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I'd use the windows task scheduler to launch msaccess.exe with the /x command line switch.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I am using the extract for another application to pick-up. The app. doesn't have the capability to configure a connector to MS Access db. to pull directly.

PHV, Thanks but I've never done anything like that before so, I'm lost with what you're talking about there... :(
 
I am using the extract for another application to pick-up.
Which application?
If it's Excel, try TransferSpreadsheet.
If you need it as a text file, try TransferText.
If it's another database, try TransferDatabase.


Randy
 
Thanks Randy,

The application runs on WebSphere with a SQL db. I used the TransferText method and it works fine.

Thanks PHV,

I figured out how to use the Windows Task Scheduler to open the database at a certain time. When it opens, it does a TransferText to a shared folder.

Now if I could only figure out how to close the database again automatically I would be all set.
 

Now if I could only figure out how to close the database again automatically I would be all set.

At the end of your code, add:
DoCmd.CloseDatabase


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top