Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

[2000]-[2003] Version d'access à partir de VBA

2 réponses
Avatar
CrazyMasterMC
Salut

Je veux adapter le comportement de mon application en fonction de la version
d'Access. Je n'arrive pas à trouver une propriété qui me la donne.

J'ai bien application.vbe.version ou application.dbengine.version mais pas
de application.version ou application.application.version.

Quelqu'un pourrait-il m'aider à ce sujet ?

D'avance merci

Laurent

2 réponses

Avatar
pgz
Bonjour,

Le numéro de version Office s'obtient avec
Application.Version qui existe bien.

Pour avoir le format de fichier, il faut consulter
Application.CurrentProject.FileFormat qui renvoie un index et pas
directement le format de fichier. Pour avoir le format de fichier en clair:

Dim strFormat as String
Select Case CurrentProject.FileFormat
Case acFileFormatAccess2
strFormat = "Microsoft Access 2"
Case acFileFormatAccess95
strFormat = "Microsoft Access 95"
Case acFileFormatAccess97
strFormat = "Microsoft Access 97"
Case acFileFormatAccess2000
strFormat = "Microsoft Access 2000"
Case acFileFormatAccess2002
strFormat = "Access 2002 - 2003"
End Select

MsgBox "Format de fichier " & strFormat & "."

Bon courage,

--
pgz
_____________________________




Salut

Je veux adapter le comportement de mon application en fonction de la version
d'Access. Je n'arrive pas à trouver une propriété qui me la donne.

J'ai bien application.vbe.version ou application.dbengine.version mais pas
de application.version ou application.application.version.

Quelqu'un pourrait-il m'aider à ce sujet ?

D'avance merci

Laurent



Avatar
Laurent Jordi
Merci
--
http://www.ezlogic.mc
http://www.laurentjordi.net



Bonjour,

Le numéro de version Office s'obtient avec
Application.Version qui existe bien.

Pour avoir le format de fichier, il faut consulter
Application.CurrentProject.FileFormat qui renvoie un index et pas
directement le format de fichier. Pour avoir le format de fichier en clair:

Dim strFormat as String
Select Case CurrentProject.FileFormat
Case acFileFormatAccess2
strFormat = "Microsoft Access 2"
Case acFileFormatAccess95
strFormat = "Microsoft Access 95"
Case acFileFormatAccess97
strFormat = "Microsoft Access 97"
Case acFileFormatAccess2000
strFormat = "Microsoft Access 2000"
Case acFileFormatAccess2002
strFormat = "Access 2002 - 2003"
End Select

MsgBox "Format de fichier " & strFormat & "."

Bon courage,

--
pgz
_____________________________




Salut

Je veux adapter le comportement de mon application en fonction de la version
d'Access. Je n'arrive pas à trouver une propriété qui me la donne.

J'ai bien application.vbe.version ou application.dbengine.version mais pas
de application.version ou application.application.version.

Quelqu'un pourrait-il m'aider à ce sujet ?

D'avance merci

Laurent