Display tabledefs in remote pwd protected db

David Mack

Registered User.
Local time
Today, 01:09
Joined
Jan 4, 2000
Messages
53
I am trying to run through the tabledefs in a remote Access 2000 database. While experimenting, I had no trouble looking at the tables. I then Jet password protected the target db. I have fumbled with the help facility and as a loss how to code the connect parameter. My code so far:

Sub OpenRemote()

Dim dbsTarget As Database
Dim tdfTarget As TableDef
Dim TableName As String
Set dbsTarget = DBEngine.Workspaces(0).OpenDatabase("D:\DB\Target.mdb", , False, "Access 9.0; pwd=doggie")

For Each tdfTarget In dbsTarget.TableDefs
TableName = tdfTarget.Name
Debug.Print TableName
Next

Set dbsTarget = Nothing

End Sub

Dave Mack
 

Users who are viewing this thread

Back
Top Bottom