I'm having a bit of a problem and I'm hoping someone can help me here.
Some users here are forgetting to close out of Access when they are finished with the databases, and it's causing problems when we try to compact and repair them. I was searching on here before and I found this VBscript coding:
strLDB = "C:\Docs\TT.ldb"
strMDB = "C:\Docs\TT.mdb"
Set FSO=CreateObject("Scripting.FileSystemObject")
If Not FSO.FileExists(strLDB) then
msgbox "Not open"
wscript.Quit
End If
set acApp=getobject(strMDB)
acApp.quit
I found it here:
I modified it and it does work, but some of our databases are password protected. I can't figure out a way to program that in here. Is there a way to put the password into this code so I can close those databases, or should I abandon this code and start over?
Some users here are forgetting to close out of Access when they are finished with the databases, and it's causing problems when we try to compact and repair them. I was searching on here before and I found this VBscript coding:
strLDB = "C:\Docs\TT.ldb"
strMDB = "C:\Docs\TT.mdb"
Set FSO=CreateObject("Scripting.FileSystemObject")
If Not FSO.FileExists(strLDB) then
msgbox "Not open"
wscript.Quit
End If
set acApp=getobject(strMDB)
acApp.quit
I found it here:
I modified it and it does work, but some of our databases are password protected. I can't figure out a way to program that in here. Is there a way to put the password into this code so I can close those databases, or should I abandon this code and start over?