How to make Access DB offline/online using vb script (1 Viewer)

anilraje122

New member
Local time
Today, 13:11
Joined
Aug 8, 2017
Messages
1
Hi all,

How can we make Access DB offline/online which is linked to Sharepoint site using vb script ?

Using below code I'm able to run the macro but I need to make my access DB offline before proceeding with the macro. I'm struck here!
Please help me with this

Dim accessApp
set accessApp = createObject("Access.Application")
accessApp.OpenCurrentDataBase("testDb.accdb")
accessApp.docmd.runmacro "testMacro"
accessApp.Quit
set accessApp = nothing
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 03:41
Joined
Apr 27, 2015
Messages
6,321
Good afternoon, as you can probably surmise, there are not too many users here that respond to questions regarding SP. I am not sure, I can only guess that there are not many who use it or are versed in it.

I myself use SP as a BE for my tables and have learned that this site is not a good resource. That being said, I have found two sites that have taught me what I have needed to know. The first one is FMS:
https://www.fmsinc.com/microsoftaccess/modules/code/sharepoint/databases/sharepointdatabases.htm

The code is incomplete, but there is enough there to get you started. I have seriously considered buying the Access Sourcebook they reference just to get the complete modules but cannot bring myself to part with the $400...yet!

Here is another site I have found recently. In it is a three part Blog about how Access and Sharepoint work together:
https://accessexperts.com/blog/2011/06/15/sharepoint-and-access-how-do-they-fit-together/

The author, Ben Clothier, gives many tips on how to get the most of this union. One thing in particular is how to link a SP view with VBA rather than using the whole list. Very useful.

He also co-authored a book and sells it for $75 which I have just recently ordered. Hopefully this will be all I need...if not, I just may have to invest in the FMS product.

Best of luck and please let me know if and how you get this resolved.

John
 

Users who are viewing this thread

Top Bottom