Access/VBA Library

SetApplicationTitle

Sets the title of the current application. The title will be the name of the database followed by its version and optional an additional text.

Syntax

SetApplicationTitle( version [, additionalText] )
Parameters
Name Type Description
version String Required. The version of the current database.
additionalText String Optional. Text to be added to the application title.
Default: ""
Code
Sub SetApplicationTitle(version As String, _
                        Optional ByVal additionalText As String = "")
    Dim Title As String
    Dim fs As New FileSystemObject
    
    Title = fs.GetBaseName(CurrentDb.name) & " V" & version
    If additionalText <> "" Then
        Concat Title, " - ", additionalText
    End If
    
    Call ChangeProperty("AppTitle", DB_TEXT, Title)
End Sub

Systemtag:System

Remarks

  • Be sure this procedure is called before the first call to GetApplicationTitle.

See also

  • Concat
  • ChangeProperty