Application.AppTitle property (Access)
Use the AppTitle property to specify the text that appears in the application database's title bar. For example, you can use the AppTitle property to specify that the string "Inventory Control" appear in the title bar of your Inventory Control database application.
Syntax
expression.AppTitle
expression A variable that represents an Application object.
Setting
The AppTitle property is a string expression containing the text to appear in the title bar.
The easiest way to set this property is by using the Application Title option in the Access Options dialog box. You can also set this property by using a macro or Visual Basic.
To set the AppTitle property by using a macro or Visual Basic, you must first either set the property in the Access Options dialog box once or create the property in the following ways:
In a Microsoft Access database, you can add it by using the CreateProperty method and append it to the Properties collection of the Database object.
In a Microsoft Access project (.adp), you can add it to the AccessObjectProperties collection of the CurrentProject object by using the Add method.
You must also use the RefreshTitleBar method to make any changes visible immediately.
Remarks
If this property isn't set, the string "Microsoft Access" appears in the title bar.
This property setting takes effect immediately after it is set in code (as long as the code includes the RefreshTitleBar method), or the Access Options dialog box is closed.
Example
The following example shows how to change the AppIcon and AppTitle properties in a Microsoft Access database. If the properties haven't already been set or created, you must create them and append them to the Properties collection by using the CreateProperty method.
Sub cmdAddProp_Click()
Dim intX As Integer
Const DB_Text As Long = 10
intX = AddAppProperty("AppTitle", DB_Text, "My Custom Application")
intX = AddAppProperty("AppIcon", DB_Text, "C:\Windows\Cars.bmp")
CurrentDb.Properties("UseAppIconForFrmRpt") = 1
Application.RefreshTitleBar
End Sub
Function AddAppProperty(strName As String, _
varType As Variant, varValue As Variant) As Integer
Dim dbs As Object, prp As Variant
Const conPropNotFoundError = 3270
Set dbs = CurrentDb
On Error GoTo AddProp_Err
dbs.Properties(strName) = varValue
AddAppProperty = True
AddProp_Bye:
Exit Function
AddProp_Err:
If Err = conPropNotFoundError Then
Set prp = dbs.CreateProperty(strName, varType, varValue)
dbs.Properties.Append prp
Resume
Else
AddAppProperty = False
Resume AddProp_Bye
End If
End Function
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.