Conaitre le chemin ss VBA97

oliv76n Messages postés 31 Date d'inscription jeudi 9 janvier 2003 Statut Membre Dernière intervention 17 octobre 2005 - 22 avril 2003 à 10:45
oliv76n Messages postés 31 Date d'inscription jeudi 9 janvier 2003 Statut Membre Dernière intervention 17 octobre 2005 - 22 avril 2003 à 13:25
Bonjours,
Je recherche le moyen de connaitre le chemin de ma base de données. Je programme sous Access97.
Merci.
Olivier.

4 réponses

stevebelgium Messages postés 180 Date d'inscription lundi 17 mars 2003 Statut Membre Dernière intervention 7 juin 2003 1
22 avril 2003 à 10:56
MsgBox CurDir
0
BasicInstinct Messages postés 1470 Date d'inscription mardi 5 février 2002 Statut Membre Dernière intervention 20 octobre 2014 12
22 avril 2003 à 10:58
Sub Main()
Chemin = Left(CurrentDb.Name, InStrinv(CurrentDb.Name, "\ZZ"))
End Sub
Public Function InStrinv(Chaine1 As String, Chaine2 As String) As Integer
Dim Z As Integer, Y As String, OK As Boolean
Z = 0
While Not OK
Y = InStr(Z + 1, Chaine1, Chaine2)
If Y <> 0 Then
Z = Y
Else
OK = True

End If
Wend
InStrinv = Z
End Function

:clown) BasicInstinct :clown)
0
BasicInstinct Messages postés 1470 Date d'inscription mardi 5 février 2002 Statut Membre Dernière intervention 20 octobre 2014 12
22 avril 2003 à 10:59
oups

Sub Main()
Chemin = Left(CurrentDb.Name, InStrinv(CurrentDb.Name, ""))
End Sub
Public Function InStrinv(Chaine1 As String, Chaine2 As String) As Integer
Dim Z As Integer, Y As String, OK As Boolean
Z = 0
While Not OK
Y = InStr(Z + 1, Chaine1, Chaine2)
If Y <> 0 Then
Z = Y
Else
OK = True

End If
Wend
InStrinv = Z
End Function

:clown) BasicInstinct :clown)
0
oliv76n Messages postés 31 Date d'inscription jeudi 9 janvier 2003 Statut Membre Dernière intervention 17 octobre 2005
22 avril 2003 à 13:25
merci.

Olivier.
0
Rejoignez-nous