• Title bar

    Author
    Topic
    #1769452

    I am maintaining an Access 2000 program that I did not write. I am unable to figure out how the programmer makes the Title bar display the project name and version number. I looked in the project properties could not find any match text. I looked through the code for something like the way VB allow you to do it(i.e. lblVersion = App.version). What am I missing?

    Viewing 1 reply thread
    Author
    Replies
    • #1783404

      I’m not certain of a way to do it on every form at once, but did you try typing the text as the Caption Property of the form? The form Caption specifies the text that appears in the title bar of the Form in the Form view.
      Someone else may know a better way …

    • #1783405

      You can control the caption of the Title Bar under Tools|Startup… Use the Application Title field.

      HTH thumbup

      • #1783422

        Here’s something based originally on on-line help a version or two back. It requires a reference to the DAO object library if you’re running Access 2000.

        ‘****************************************

        Public Function SetAppTitle( _
                        ByVal varAppTitle As Variant)
          On Error GoTo Proc_err
          ' modified 11/11/98
            Dim intX As Integer   'holds result of call _
                                   to AddAppProperty
            ' Set the application window title to a specified
            ' name on opening the database and return it to
            ' the default on close.
        
            Select Case IsEmpty(varAppTitle)
                Case True
                    intX = AddAppProperty("AppTitle", _
                              dbText, "Microsoft Access")
                Case Else
                    If IsNull(varAppTitle) Then
                        intX = AddAppProperty("AppTitle", _
                                  dbText, "Microsoft Access")
                    Else
                        intX = AddAppProperty("AppTitle", _
                                dbText, varAppTitle)
                    End If 'IsNull(varAppTitle) 
            End Select 'IsEmpty(varAppTitle)
        
            SetAppTitle = True
        Proc_exit:
          'call the application method to refresh
          'the title bar
          RefreshTitleBar
          Exit Function
        Proc_err:
          SetAppTitle = False
          Resume Proc_exit
        End Function 'SetAppTitle( _
                        ByVal varAppTitle As Variant)
        
        '*****************************************
        Function AddAppProperty(strName As String, _
                                varType As Variant, _
                               varValue As Variant) As Integer
        ' Copied from on-line help
        ' Adds a property to the database
            Dim dbs As DAO.Database
            Dim prp As DAO.Property
            Const conPropNotFoundError = 3270
        
            Set dbs = CurrentDb
            On Error GoTo AddProp_Err
            dbs.Properties(strName) = varValue
        
        AddAppProperty = True
        
        AddProp_Bye:
            On Error Resume Next
            Set prp = Nothing
            Set dbs = Nothing
            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 'AddAppProperty(strName As String, _
                                varType As Variant, _
                               varValue As Variant) As Integer
    Viewing 1 reply thread
    Reply To: Title bar

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: