Closing a Database

B

Bunky

I have written some VB Scripting to run some code via Windows Scheduler when
I am fast asleep. Everything works well except for one very minor point.
After my macro has finished, I would like it to close the database and exit
but I cannot seem to accomplish this. Here is my code.

Public Function Kent()
dim accessApp

set accessApp = createObject("Access.Application")

accessApp.OpenCurrentDatabase("\\iocc-server\dcs\kenttesting\testblank.mdb")

accessApp.Run "RunPrintTest1"
accessApp.Quit
set accessApp = nothing
End Function

Any ideas where I am wrong?

Thanks in advance for the assistance!
 

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

Top