[AccessD] Property Apptitle

Borge Hansen pcs at azizaz.com
Sat Feb 12 03:06:36 CST 2005


For those of you toiling on the weekend:

This is something that has annoyed me for a while.

I've set the database property Apptitle.
Both in the startup dialog window and in code on startup 
This is the code for setting the Apptitle:

***************
Sub ChangeTitle()
    Dim Obj As Object
    Dim dbs As DAO.Database
    Dim strAppTitle As String
    
    Const conPropNotFoundError = 3270
    strAppTitle = DLookup("AppTitle", "USystblsysvar")
       
    On Error GoTo ErrorHandler
    Set dbs = CurrentDb
    dbs.Properties!AppTitle = strAppTitle
    Application.RefreshTitleBar
    Exit Sub
    
ErrorHandler:
    If Err.Number = conPropNotFoundError Then
        Set Obj = dbs.CreateProperty("AppTitle", dbText, strAppTitle)
        dbs.Properties.Append Obj
    Else
        MsgBox "Error: " & Err.Number & vbCrLf & Err.Description
    End If
    Resume Next
End Sub
***********************

The Application Name appears in the database window.

In Access97 the Application Name would also appear on the title bar of all the message dialog boxes, instead of "Microsoft Access"

This doesn't happen in AccessXP

WHY NOT???

In the Help section for Msgbox it says:

Syntax
MsgBox(prompt[, buttons] [, title] [, helpfile, context])

bla bla ... and then

      title Optional. String expression displayed in the title bar of the dialog box. If you omit title, the application name is placed in the title bar. 


Help on Apptitle says in the remarks section:

Remarks
If this property isn't set, the string "Microsoft Access" appears in the title bar.

This property's setting takes effect immediately after setting the property in code (as long as the code includes the RefreshTitleBar method) or closing the Startup dialog box.

What am I missing here?

Borge

 



More information about the AccessD mailing list