|
-
Feb 22nd, 2000, 07:53 PM
#1
Thread Starter
Junior Member
Can anyone help me. I have been able to abstract from my MyFile.mdb database all the Tables that are contained within.
The following seems to work.
For Each Td In Data1.Database.TableDefs
If (Left(Td.Name, 4) <> "MSys") Then
CBox1.AddItem Td.Name
Else
'Add Nothing
End If
Next
As well as adding the table names to a combobox I get other entries such as
MSysQueries
MSysACE's
MSysRelationships
MSysObjects
As you can see I'm removing these entries by using the If (Left(Td.Name, 4) <> "MSys") Then statement.
Is there a better or even correct way of gettting the Table names without the MSys...
Thanks
-
Feb 23rd, 2000, 02:13 PM
#2
Guru
Code:
For Each td In db.TableDefs
If td.Attributes = 0 Then
MsgBox td.Name
End If
Next td
-
Feb 24th, 2000, 06:03 AM
#3
Thread Starter
Junior Member
Thanks Clunietp, that seemed to work fine.
I have another problem though.
Is it possible to get the Table names without invoking a data1.refresh when I change the DatabaseName and/or Recordsource.
Thanks again
-
Jan 9th, 2002, 07:09 PM
#4
This seems to be the answer I'm looking for. A big question is: do system tables all begin with "Msys?" Another is: does the "attribute = 0" mean a system table? Therefore (if so) any "attribute > 0" (or <> 0) would be a user-defined table?
Are queries setup the same way ("msys" and "attribute = 0")?
If so, I'll love you guys forever...
:-P
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|