Article ID: 129732
Article Last Modified on 5/6/2003
Name SourceTableName
Updatable RecordCount
DateCreated ValidationRule
LastUpdated ValidationText
Connect ConflictTable
Attributes
Field Object, Fields Collection - Summary
RecordSet Object, Recordsets Collection - Summary
TableDef Object, TableDefs Collection - Summary
Dim MyDB As Database
Dim MySet As Recordset
Dim MyProperty As Property
Dim MyTableDef as TableDef
' Access database
Set MyDB = DBEngine.Workspaces(0).OpenDatabase("biblio.mdb")
Set MySet = MyDB.OpenRecordset("Authors", dbOpenTable)
Set MyTableDef = MyDB("Authors")
'display properties collection for Field
For Each MyProperty In MySet(0).Properties
List1.AddItem MyProperty.Name
Next
'display properties collection for Recordset
For Each MyProperty In Myset.Properties
List2.AddItem MyProperty.Name
Next
'display properties collection for Tabledef
For Each MyProperty In MyTableDef.Properties
List3.AddItem MyProperty.Name
Next
'Append an application-defined TableDef property by
'changing its default value so it appears in the list
On Error GoTo myerr: 'if RowHeight property exists trap error
Set MyProperty = MyTableDef.CreateProperty("RowHeight")
MyProperty.Type = dbinteger
MyProperty.Value = 9
MyTableDef.Properties.Append MyProperty
myerr:
MsgBox("RowHeight Property already exists, Please create another")
'Print list again to see that RowHeight is displayed
For Each MyProperty In MyTableDef.Properties
List4.AddItem MyProperty.Name
Next
MySet.Close
MyDb.Close
On Error GoTo 0
Additional query words: kbVBp400 kbVBp500 kbVBp600 kbdse kbDSupport kbVBp
Keywords: kbinfo KB129732