Modifier la barre de titre d'Access
Le code qui suit permet de modifier la barre de titre de l'application Access.
L'argument "strTitle" correspond au texte que l'on souhaite mettre dans la barre de titre d'Access.
Public Function EditTitleApp(strTitle As String)
Dim db As Database, prp As Property
Const conErrPropNonTrouvée = 3270On Error GoTo Err_EditTitleApp
Set db = CurrentDb
db.Properties!AppTitle = strTitle
Application.RefreshTitleBar
db.Close: Set db = Nothing
Exit FunctionErr_EditTitleApp:
If Err.Number = conErrPropNonTrouvée Then
Set prp = db.CreateProperty("AppTitle", dbText, strTitle)
db.Properties.Append prp
Set prp = Nothing
Else
MsgBox "Erreur : " & Err.Number & vbCrLf & Err.Description
End If
Resume NextEnd Function
Auteur : Jessy SEMPERE