Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Latest commit

 

History

History
69 lines (44 loc) · 2.27 KB

properties-object-access.md

File metadata and controls

69 lines (44 loc) · 2.27 KB
title keywords f1_keywords ms.prod api_name ms.assetid ms.date
Properties Object (Access)
vbaac10.chm10046
vbaac10.chm10046
access
Access.Properties
7e888aad-e783-dfc5-46df-9d92c89cfc35
06/08/2017

Properties Object (Access)

The Properties collection contains all of the built-in properties in an instance of an open form, report, or control. These properties uniquely characterize that instance of the object.

Remarks

Use the Properties collection inVisual Basicor in an expression to refer to form, report, or control properties on forms or reports that are currently open.

You can use the Properties collection of an object to enumerate the object's built-in properties. You don't need to know beforehand exactly which properties exist or what their characteristics ( Name and Value properties) are to manipulate them.

Note In addition to the built-in properties, you can also create and add your own user-defined properties. To add a user-defined property to an existing instance of an object, see the AccessObjectProperties collection and Add method topics.

Example

The following example enumerates the Forms collection and prints the name of each open form in the Forms collection. It then enumerates the Properties collection of each form and prints the name of each property and value.

Sub AllOpenForms() 
 Dim frm As Form, prp As Property 
 
 ' Enumerate Forms collection. 
 For Each frm In Forms 
 ' Print name of form. 
 Debug.Print frm.Name 
 ' Enumerate Properties collection of each form. 
 For Each prp In frm.Properties 
 ' Print name of each property. 
 Debug.Print prp.Name; " = "; prp.Value 
 Next prp 
 Next frm 
End Sub

Properties

Name
Application
Count
Item
Parent

See also

Other resources

Access Object Model Reference