Bound Object Frame Control, Chart Control, Check Box Control, Combo Box Control, Command Button Control, Controls Collection, Form, Form Section, Forms Collection, Image Control, Label Control, Line Control, List Box Control, Option Button Control, Option Group Control, Page Break Control, Properties Collection, Rectangle Control, Report, Report Section, Reports Collection, Screen Object, Subform/Subreport Control, Text Box Control, Toggle Button Control, Unbound Object Frame Control.
You can use the Application property in Visual Basic to access the active Microsoft Access Application object and its related properties.
The Application property is set by Microsoft Access and is read-only.
Each Microsoft Access object has an Application property that returns the current Application object. You can use this property to access any of the Application object properties. For example, you could refer to the menu bar for the Application object from the current form using the following syntax:
Me.Application.MenuBar
Application Object.
This example demonstrates the use of the Application and DBEngine properties to display the DBEngine properties in a message box.
Private Sub Command1_Click() Dim x As Integer x = DisplayApplicationInfo(Me) Sub DisplayApplicationInfo(obj As Object) As Integer Dim apl As Object, intI As Integer, strProps As String On Error Resume Next ' Form application property. Set apl = obj.Application MsgBox "Application visible Property = " & apl.Visible If apl.UserControl = True Then For intI = 0 To apl.DBEngine.Properties.Count - 1 strProps = strProps & apl.DBEngine.Properties(intI).Name & ", " Next intI End If MsgBox Left(strProps, Len(strProps) - 2) & ".", vbOK, _ "DBEngine Properties"Function