Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object Model for Tables

Status
Not open for further replies.

markhirt

Programmer
Mar 26, 2002
13
US
I want to iterate through all tables in my .mdb file and look at properties like number of fields, field name, field type, etc etc etc

I'm trying to get the following pseudocode segment to work but I'm afraid I have the wrong part of the object model... can someone please guide me?

I continue to get error about an object not being open or other stuff. All I want is to programatically get to table definition information.

Thanks,
Mark
----------------------

Sub AllTables()
Dim obj As AccessObject, dbs As Object
Dim Prop as AccessObjectProperty

Set dbs = Application.CurrentData

For Each obj In dbs.AllTables
Debug.Print obj.Name
for Each Prop in obj.AccessObjectProperties
Debug.Print Prop.Name
Debug.Print Prop.Value
Next Prop
Next obj
End Sub
 
If I understand you correctly, can I suggest that the Documenter that comes with Access might do what you are trying to do (Tools -> Analyze -> Documenter). Might save you some time.

If I misunderstood, I apologize... Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top