<< Click to Display Table of Contents >>
Fields Object |
A Fields object represents a collection of Fields of a Storage on a table. This object is created automatically when adding a Storage in an application.
To insert new Fields, right-click the Fields object and select the Insert - Storage Field option. To delete a Field, right-click it and select the Delete option.
NOTES |
•In applications created before version 5.0 of Elipse E3, the Fields property of a Storage is a collection that supports the Item method to access the available Fields. Starting with version 5.0, this property also returns a Fields object, and therefore the way to access Fields is different for both ways. The next example shows the correct way to use it as an object and as a collection in a script. •Applications saved in version 5.0 convert Storage objects from a collection format to an object and CANNOT be opened in previous versions anymore. |
To access the collection of Storage Fields as a collection, as well as an object, use the formats described in the next example.
'This application contains an object called Storage1
'which contains a Field called Field1
'To access this Field as a collection,
'use the next syntax
Set collectionField = Application.GetObject("Storage1").Fields.Item("Field1")
'To access the same Field as an object,
'use the next syntax
Set nativeField = Application.GetObject("Storage1.Fields.Field1")
Please check the next topic, Storage Field, for more information about the properties of the existing Storage Fields in a Fields object.