Running application on Access Runtime

Alan Chan

Registered User.
Local time
Today, 08:20
Joined
Aug 28, 2013
Messages
14
After developing a database application on Access 2010, I send to a friend to have a test run on Access Runtime. There are two problems and would appreciate if anyone can help.

1. The accdb version comes up with an error message that it cannot verify that the the program come from a Trustworthy source. When I checked the OK button, the screen turns blank. How can I remove this message and let the program run?

2. The accde version cannot run, with an error message stating that it cannot read the VBA program and it has to remove the program to open the database. But I can run the accde application on my desktop PC installed with Access 2010. Is this due to some user priviledge setting on the database?

Thanks for any advice.

Alan Chan
 
You can add a trustworthy locations programmatically:
Versions and paths need to be changed:
Code:
'Add Trusted Locations

Dim oWShell
Dim strLocalAppData
Dim strTrustedKey
Set oWShell=CreateObject("WScript.Shell")
strLocalAppData = oWShell.ExpandEnvironmentStrings("%LOCALAPPDATA%")
strTrustedKey = "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Access\Security\Trusted Locations\DTS\"
oWShell.RegWrite strTrustedKey, 1, "REG_BINARY"
oWShell.RegWrite strTrustedKey + "Path", strLocalAppData + "\DTS", "REG_SZ"
oWShell.RegWrite strTrustedKey + "Description", "Desktop Services Launchpad target", "REG_SZ"
oWShell.RegWrite strTrustedKey + "AllowSubfolders", "1", "REG_DWORD"

You need to reconnect the backend to the frontend again programmatically.
Using an ini file, where you store the path to the backend or just hardcoded e.g. on the same directory as the frontend.

When the screen turns blank, to debug, add messages to follow its progress.

HTH:D
 

Users who are viewing this thread

Back
Top Bottom