Results 1 to 4 of 4

Thread: Title bar

  1. #1
    AJG
    Guest

    Title bar

    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?

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Title bar

    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 ...

  3. #3
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Title bar

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

    HTH <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Title bar

    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.

    '****************************************
    <pre>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
    </pre>

    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •