A project I am working on involves a two-tiered backend database setup. A database called "Finance Backup.mdb" runs a bunch of queries that creates some backup tables, and then exports these tables to "Finance Views.mdb", which my front-end application links to. I have set things up so that Finance Backup runs and exports the tables every night (via a scheduled windows task).
The problem I am having is that I have set a password on "Finance Views.mdb." I got some code off of msdn that has allowed me to still use and link to the tables in Finance Views from my front-end application by using the openDatabase method and passing it the appropriate password. Here's the code for this:
This works wonderfully to allow front-end application access to Finance Views. However, I cannot get Finance Backup to work, because Finance Views requires a password for any table to be exported to it, and even though I've tried the above code, a window requesting the password pops up during the export process of Finance Backup.
So, is there someway to export tables to a password-protected database through code?
The problem I am having is that I have set a password on "Finance Views.mdb." I got some code off of msdn that has allowed me to still use and link to the tables in Finance Views from my front-end application by using the openDatabase method and passing it the appropriate password. Here's the code for this:
Code:
Dim wrk As Workspace
Dim dbProtected As Database
Set wrk = DBEngine.Workspaces(0)
Set dbProtected = wrk.OpenDatabase("C:\Finance Views", False, False, ";PWD=thePassword")
This works wonderfully to allow front-end application access to Finance Views. However, I cannot get Finance Backup to work, because Finance Views requires a password for any table to be exported to it, and even though I've tried the above code, a window requesting the password pops up during the export process of Finance Backup.
So, is there someway to export tables to a password-protected database through code?