Mega Code Archive

 
Categories / VisualBasic Script / Access
 

User Defined Property

Sub exaUserDefinedProperty()     Dim db As Database     Dim tbl As TableDef     Dim prp As Property          Dim str As String          Set db = CurrentDb     Set tbl = db!BOOKS          Set prp = tbl.CreateProperty("UserProperty", dbText, "Programming DAO is fun.")     tbl.Properties.Append prp     str = ""     For Each prp In tbl.Properties         Debug.Print prp.Name         Debug.Print prp.Value         Debug.Print prp.Type         Debug.Print prp.Inherited     Next prp     Debug.Print tbl.Properties.Count       End Sub