guys i'm really perplexed by this and i have done an exhaustive search of all the solutions.
i'm trying to run a VBScript which works perfect on my computer but when i do it on my colleague's computer it always gives me an error 7866
here's my code and here's what i tried
strNameOfFolderVBScriptIsIn = Replace(wscript.ScriptFullName, wscript.ScriptName, "")
strAppName = "WBR.mdb"
strLocalFolder = strNameOfFolderVBScriptIsIn
strAppLocalPath = strLocalFolder & "\" & strAppName
' Create the File System Object.
Set objFSO = CreateObject("Scripting.FileSystemObject")
'THIS GIVES ME TRUE WHICH TELLS ME THAT THE PATH IS CORRECT AND THE FILE DOES EXIST
Set objAccess = CreateObject("Access.Application")
objAccess.Visible = true
'error 7866 - file exists so that means exclusive access? but no ldb file
1) made sure there was no password protecting the access file. no password in the VBA code as well. when going to tools and references also no password.
2) ensure i had the appropriate references. i'm using Access 2007 whilst my colleague is using Access 2007.
3) there wasn't any pop up box for security settings e.g. run unsafe expressions. btw how do i set Access' security settings to the lowest? i can do it in excel but i don't know how to do it in Access.
4) i'm opening the database as shared
5) it's on a local drive NOT a network drive so there aren't any network drive mapping issues
6) i created an empty database with the exact same name just in case the DB was the one causing the problem but the same issue occured. can find the file name using FSO fileexist but cannot open in Access
7) both my colleague and my computer show file extensions in file explorer
i'm going crazy here guys. really need to solve this. helpppp!!!!!