Hello,
To solve this problem, I added the missing properties used to my database created in VBA from the <Append> method of the properties.
Here is a part of VBA code
Dim db As Database
Dim pty As Property
.....
.....
On Error GoTo Gesterr1
'Crée la base de la base de données servant à visualiser le ruban
Set db = DBEngine.Workspaces(0).CreateDatabase(strPathDataBaseViewRibbon & "\" & nameDataBaseViewRibbon, dbLangGeneral)
'Transfert le formulaire
DoCmd.TransferDatabase acExport, "Microsoft Access", filePathDataBase, acForm, "ViewTest", "ViewTest", False
On Error GoTo 0
'Crée les différentes propriétés des options
'Affichage des documents sous forme d'onglets
On Error Resume Next
Set pty = db.Properties("UseMDIMode")
On Error GoTo 0
If pty Is Nothing Then
db.Properties.Append db.CreateProperty("UseMDIMode", dbByte, 0)
Else
db.Properties("UseMDIMode") = 0
End If
'Nom du formulaire de démarrage
On Error Resume Next
Set pty = db.Properties("StartUpForm")
On Error GoTo 0
If pty Is Nothing Then
db.Properties.Append db.CreateProperty("StartUpForm", dbText, "ViewTest")
Else
db.Properties("StartUpForm") = "ViewRibbon"
End If
'Pas d'affichage du volet de navigation
On Error Resume Next
Set pty = db.Properties("StartUpShowDBWindow")
On Error GoTo 0
If pty Is Nothing Then
db.Properties.Append db.CreateProperty("StartUpShowDBWindow", dbBoolean, False)
Else
db.Properties("StartUpShowDBWindow") = False
End If
'Pas d'affichage des menus intégrés complets
On Error Resume Next
Set pty = db.Properties("AllowFullMenus")
On Error GoTo 0
If pty Is Nothing Then
db.Properties.Append db.CreateProperty("AllowFullMenus", dbBoolean, False)
Else
db.Properties("AllowFullMenus") = False
End If
'Pas d'affichage des menus contextuels intégrés
On Error Resume Next
Set pty = db.Properties("AllowShortcutMenus")
On Error GoTo 0
If pty Is Nothing Then
db.Properties.Append db.CreateProperty("AllowShortcutMenus", dbBoolean, False)
Else
db.Properties("AllowShortcutMenus") = False
End If
db.Close
.....
.....
I also noticed that the <StartUpForm> option property was not present in the large list of option properties for the current database.