Read secured access database table from Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I need to read a table in a secured access database using VBA in an Excel macro. For instance :
Set db = OpenDatabase(MyDatabase)
Set rst = db.OpenRecordset(MySQL)
Problem is that the database is secured (through an Access workgroup) and that above code does not allow me to open the database. Question: is this possible using VBA and if so, how?
 
Hi:

Take a look at this --
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndao/html/
daotoadoupdate_topic4.asp

Regards,

Naresh Nichani
Microsoft Access MVP

DJ said:
Hi,
I need to read a table in a secured access database using VBA in an Excel macro. For instance :
Set db = OpenDatabase(MyDatabase)
Set rst = db.OpenRecordset(MySQL)
Problem is that the database is secured (through an Access workgroup) and
that above code does not allow me to open the database. Question: is this
possible using VBA and if so, how?
 
I need to read a table in a secured access database using VBA in an
Excel macro.

Look up help for the Workspace object in the DBEngine object. The idea is
to open a workspace object, set its security properties (mdw file,
username, password etc) and then open the database inside it.

Hope that helps



Tim F
 
Long time since I did this,
but from memory,
define a separate workspace and set the userid and password to open
it.
This was in MSA97. Since the passowrd prompt has moved to when you
open the DB MSA2K, maybe th eparameters are in the OpenDatabase now.
Look in help (mine is broken so I can't do it for you.

Regards Greg Kraushaar
Wentworth Falls Australia
(Do not email - the reply address is a Spam spoofer)
(If you really must, remove all UCase and numbers)
 
Back
Top