[AccessD] Set Application Title Through Code

Mitsules, Mark Mark.Mitsules at ngc.com
Mon Jul 14 13:23:46 CDT 2003


In help, look under "RefreshTitleBar Method".  However, I've pasted the
example below.


Mark

<code>
Sub ChangeTitle()
    Dim obj As Object
    Const conPropNotFoundError = 3270
    
    On Error GoTo ErrorHandler
    ' Return Database object variable pointing to
    ' the current database.
    Set dbs = CurrentDb
    ' Change title bar.
    dbs.Properties!AppTitle = "Contacts Database"
    ' Update title bar on screen.
    Application.RefreshTitleBar
    Exit Sub
    
ErrorHandler:
    If Err.Number = conPropNotFoundError Then
        Set obj = dbs.CreateProperty("AppTitle", dbText, "Contacts
Database")
        dbs.Properties.Append obj
    Else
        MsgBox "Error: " & Err.Number & vbCrLf & Err.Description
    End If
    Resume Next
End Sub
</code>



-----Original Message-----
From: Rocky Smolin - Beach Access Software [mailto:bchacc at san.rr.com] 
Sent: Monday, July 14, 2003 2:18 PM
To: AccessD at databaseadvisors.com
Subject: [AccessD] Set Application Title Through Code


Dear List:

Does anyone know how to set the Application Title through code?  The one you
can set manually from Tools-->Startup?

MTIA,

Rocky Smolin
Beach Access Software


More information about the AccessD mailing list