Could someone tell me what is the MS access (2000) equivalent of systables.
Thanks
Simon
Printable View
Could someone tell me what is the MS access (2000) equivalent of systables.
Thanks
Simon
Go to Tools > Options ans select View tab. Check System objects and click Apply. You should by now see all system objects in your DB window.
this seems to work, the msysobjects just gives you a permission denied error.Code:
Set Access_Conn = CreateObject("ADODB.Connection")
DataBase_Path = Me.File1.Path & "\" & Me.File1
DataBase_Path = Replace(DataBase_Path, "\\", "\")
Access_Conn.ConnectionString "Provider=Microsoft.JET.OLEDB.4.0;Data Source=" & DataBase_Path
Access_Conn.Open
Set SQL_RS = Access_Conn.OpenSchema(adSchemaTables)
Do While SQL_RS.EOF = False
Me.List1.AddItem (SQL_RS.Fields("table_name"))
SQL_RS.MoveNext
Loop
Access_Conn.Close
Simon
If you're trying to add new objects to exsisting db then look at my respond in this thread .
Nope just wanted a list of tables, so I could let my users select one.
Simon
OK, here we go (you'll need to set references to that same library I've mentioned in that thread):
VB Code:
Private Sub Command1_Click() '============================ Dim que As ADOX.Table Dim cat As ADOX.Catalog Dim cnn As ADODB.Connection Dim i% Set cnn = New ADODB.Connection cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & App.Path & "\biblio.mdb;" Set cat = New ADOX.Catalog Set cat.ActiveConnection = cnn For Each que In cat.Tables If Not InStr(1, LCase(que.Name), "sys") > 0 Then Debug.Print vbNewLine & que.Name For i = 0 To que.Columns.Count - 1 Debug.Print que.Columns(i).Name & vbTab & que.Columns(i).Type & vbTab _ & que.Columns(i).DefinedSize & vbTab & que.Columns(i).Attributes Next i End If Next End Sub