Right click the new Key and select New > Expandable String Value (for runtime 2013, just String Value for earlier version) ĩ. now add a new KEY to the Trusted Locations directory by right clicking the directory and selecting New > Key (You can rename this to something meaningful) Ĩ. change the name of the DWORD to "AllowNetworkLocations" Ħ. add a DWORD by right clicking the Trusted Locations directory, selecting New > DWORD (32-bit) Value ĥ. navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Access\Security\Trusted Locations Ĥ. allow Microsoft Windows Registry Editor to make changes to your system ģ. use the search in Win 7 or Win 8 and type in "regedit.exe" Ģ.
To enable trusted locations on a network drive (note items in "" are values entered - do not include the "):ġ. I did finally figure this out and post the answer here for anyone with the same issue in the future. I tried both REG_SZ and REG_EXPAND_SZ for the Path = Z:\, but I still get the warning. HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Access\Security\Trusted Locations\Location(0)
I do know how to set up the registry by adding keys: Clearly something is missing but I can't figure out what it is. (say C:\Temp) drive, but disappears once the registry is changed, so this does work - just not on a mapped network drive. Strangely it does work for local drives: The warning appears if the.
However, in access 2013 runtime, this does not seem to work, although it does work on the full version. The Path =Z:\ and the warning would disappear. In access 2010 you could play with the registry items (which seems bush league, but this is for another blog.) and set Every time I run the app I get a MS Access Security warning message stating that this is not a trusted location. The individual PCs only have access 2013 runtime, not the full version, and in fact they do not have office 2013 at all, only officeĢ010. accde application that is located on a network drive mapped to individual PCs (say Z:\). mdb file extension you'll probably want to change that.Īccess tips: have an access 2013. I was using Access 2003, not 2010, so I used the. OpenCurrentDatabase strPathToDatabase,, strPassword StrPathToDummy = CurrentProject.path & "\Dummy.mdb"Ī strPathToDummy, dbLangGeneral, dbVersion40 StrPathToRuntime = SysCmd(acSysCmdAccessDir) & "msaccess.exe" StrPassword = InputBox("Please enter password:")
The procedure I tested was this: Sub StartPasswordedDatabaseRuntime( _
I believe something like that ought to work, but I haven't tested it.Īccess tips: I made a version of the code to test (using regular Access, though, not the runtime), and it worked. OpenCurrentDatabase strPathToDatabase,, strPassword End With Q & strPathToRuntime & Q & " " & Q & strPathToDummy & Q, _ StrPathToDummy = CurrentProject.Path & "\Dummy.accdb" Code would look something like this:ĭim strPathToDummy Dim strPassword Const Q As String = """" However, I believe you could open a third, non-protected, dummy database in the runtime instance, and automate that instance to open the passworded database in that instance while supplying the password.
Unfortunately, there is no way to specify a database password on the command line, so youcan't open your password-protected database that To be opened when you start the runtime, because the runtime will close if it doesn't have a database to process. However, you need to supply a database name You can't start an instance of the Access runtime using CreateObject, but you can use the Shell function to create one, and then use GetObject to get a reference to it. I have found out that when we use runtime we cannot call Access.Application but I'm unable to find any other way of getting this second DB opened without asking the user for the password. My problem is that the script works find until right after the first DB is closed, then I get an error saying:ĪctiveX component can't create object: "Access.Application".
I created two DB's in Access 2010 that I will deploy to other PC that will not have Office 2010 installed or will not have it at all, therefore I'm using Access 2010 runtime to enable them to use my DB's.