Class AccessObjectProperties (Access VBA)
The AccessObjectProperties collection contains all of the custom AccessObjectProperty objects of a specific instance of an object. These AccessObjectProperty objects (which are often just called properties) uniquely characterize that instance of the object. To use a AccessObjectProperties class variable it first needs to be instantiated, for example
Add
You can use the Add method to add a new property as an AccessObjectProperty object to the AccessObjectProperties collection of an AccessObject object.
You can use the Remove method of the AccessObjectProperties collection to delete an existing property.
Add (PropertyName, Value)
Dim strPropertyName As String: strPropertyName =
CodeProject.Properties.Add PropertyName:=strPropertyName, Value:=
Arguments
The following arguments are required:
PropertyName (String) - A string expression that's the name of the new property.
Value (Variant) - A Variant value corresponding to the option setting. The setting of the value argument depends on the possible settings for a particular option. Can be a constant or a string value.
Count
You can use the Count property to determine the number of items in a specified collection.
CodeProject.Properties.Count
Item
The Item property returns a specific member of a collection either by position or by index.
If the value provided for the index argument doesn't match any existing member of the collection, an error occurs. The Item property is the default member of a collection, so you don't have to specify it explicitly. For example, the following two lines of code are equivalent.
Item (Index)
Index: An expression that specifies the position of a member of the collection referred to by the expression argument. If a numeric expression, the index argument must be a number from 0 to the value of the collection's Count property minus 1. If a string expression, the index argument must be the name of a member of the collection.
Remove
You can use the Remove method to remove an AccessObjectProperty object from the AccessObjectProperties collection of an AccessObject object.
Remove (Item)
Item: An expression that specifies the position of a member of the collection referred to by the object argument. If a numeric expression, the index argument must be a number from 0 to the value of the collection's Count property minus 1. If a string expression, the index argument must be the name of a member of the collection.
Dim strItem As String: strItem =
CodeProject.Properties.Remove Item:=strItem