
Opening a db within Access VB code
Access isn't a valid parameter to put within a connect string.
Try:
Set dbsAnother = wsp.OpenDatabase("C:\MyDb.mdb", True, False,
"UID=strUID;pwd=strPWD")
Can't remember, but you may have to supply your UID and password when
you create the workspace too:
Set wsp = CreateWorkspace("temp", strUID, strPWD, type)
Quote:
> I am trying to open another db within a module in Access and am using the
> following code but get an error
> couldn't find installable ISAM. What is wrong? strUID and strPWD were
> initialized to the user and password that I want accessing the db. Thanks
> in advance.
> Set wsp = DBEngine.Workspaces(0)
> ' Return reference to Another.mdb.
> Set dbsAnother = wsp.OpenDatabase("C:\MyDb.mdb", True, False, ("Access;
> UID=strUID; pwd=strPWD"))
> Dianne
--
Beer, Wine and Database Programming. What could be better?
Visit "Doug Steele's Beer and Programming Emporium"
http://webhome.idirect.com/~djsteele/