TonyJ
Oct 14th, 1999, 05:44 AM
I keep getting this error when I run my code when I get to the Set ws line (or if this is ommited) the set mydb line.
the same code works if i set the dao properties to point to my database and an associate textbox contains data from the database !
ive tried reinstalling access and vb5
HELP !!
Private Sub FindTables()
Dim rs As Recordset
Dim Mydb As Database
Dim tbl As TableDef
Dim temp As String
Dim ws As Workspace
temp = Space(100)
temp = txtDatabase.Text
dataDatabase.DatabaseName = temp
Set ws = DBEngine.Workspaces(0)
Set Mydb = ws.OpenDatabase(temp)
For Each tbl In Mydb.TableDefs
lstTables.AddItem tbl.Name
Next tbl
End Sub
the same code works if i set the dao properties to point to my database and an associate textbox contains data from the database !
ive tried reinstalling access and vb5
HELP !!
Private Sub FindTables()
Dim rs As Recordset
Dim Mydb As Database
Dim tbl As TableDef
Dim temp As String
Dim ws As Workspace
temp = Space(100)
temp = txtDatabase.Text
dataDatabase.DatabaseName = temp
Set ws = DBEngine.Workspaces(0)
Set Mydb = ws.OpenDatabase(temp)
For Each tbl In Mydb.TableDefs
lstTables.AddItem tbl.Name
Next tbl
End Sub