How can I get the count of user defined tables in an external database?
The above gives me the following error on
Set rs= ......
thanks
Code:
Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Dim sql as string
Set dbs = OpenDatabase(PathToMyTarget)
Debug.Print dbs.Name
Debug.Print dbs.QueryDefs.Count
Debug.Print dbs.TableDefs.Count
sql = "SELECT * FROM MSysObjects WHERE MSysObjects.Type=6 AND Left([Name],1)<>'~'"
Set rs = dbs.OpenRecordset(sql)
Set rs= ......
thanks
Last edited: