cs_mafalda13
Messages postés2Date d'inscriptionjeudi 22 mars 2007StatutMembreDernière intervention22 mars 2007
-
22 mars 2007 à 14:34
cs_mafalda13
Messages postés2Date d'inscriptionjeudi 22 mars 2007StatutMembreDernière intervention22 mars 2007
-
22 mars 2007 à 14:34
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.
cs_mafalda13
Messages postés2Date d'inscriptionjeudi 22 mars 2007StatutMembreDernière intervention22 mars 2007 22 mars 2007 à 14:34
bonjour,
je cherche a faire la meme chose sous access.
j'utilise la fonction suivante
Private Sub test(myPath As String, currentKey As String)
'mypath, ex: "C:\MonRep"
'currentKey = mon repertoire en cours, ex: MonRep
On Error GoTo err_test
Dim myname As String
myname = Dir(myPath, vbDirectory)
Do While myname <> ""
If myname <> "." And myname <> ".." Then
If (GetAttr(myPath & myname) And vbDirectory) = vbDirectory Then
Me.TreeView.Nodes.Add currentKey, 4, myname, myname, "IMG_FOLD"
'rappel de cette fonction sur le repertoire identifié
test myPath & myname & "", myname
End If
End If
myname = Dir
Loop
Exit Sub
err_test:
Exit Sub
End Sub
Cela fonctionne correctement jusqu'a ce que je commence a remonter,
j'obtient alors l'erreur :
22 mars 2007 à 14:34
je cherche a faire la meme chose sous access.
j'utilise la fonction suivante
Private Sub test(myPath As String, currentKey As String)
'mypath, ex: "C:\MonRep"
'currentKey = mon repertoire en cours, ex: MonRep
On Error GoTo err_test
Dim myname As String
myname = Dir(myPath, vbDirectory)
Do While myname <> ""
If myname <> "." And myname <> ".." Then
If (GetAttr(myPath & myname) And vbDirectory) = vbDirectory Then
Me.TreeView.Nodes.Add currentKey, 4, myname, myname, "IMG_FOLD"
'rappel de cette fonction sur le repertoire identifié
test myPath & myname & "", myname
End If
End If
myname = Dir
Loop
Exit Sub
err_test:
Exit Sub
End Sub
Cela fonctionne correctement jusqu'a ce que je commence a remonter,
j'obtient alors l'erreur :
"Argument ou appel de procédure incorrect"
sur "myname = Dir"
Quelqu'un peut il m'aider?