Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
3stone
Salut,
"A COSTA" | Dans ma bd d'une association, j'ai la photo de quelques associés. | Pour voir la photo quand j'ouvre un formulaire : | | Private Sb Form_Corrent() | Image1.Picture = c:Photos"& NrAssocie.Value & ".bmp" | End Sub | | Ça marche bien si la photo existe, mais… quand il n'y a pas de photo | j'aimerais voir la photo "X.bmp" (une photo sans visage).
En gardant le même principe...
Private Sb Form_Corrent() '//vérifier si le fichier existe if Dir("C:Photos" & NrAssocie.Value & ".bmp") <> "" Then Image1.Picture = "C:Photos"& NrAssocie.Value & ".bmp" else Image1.Picture = "C:PhotosX.bmp" end if End Sub
"A COSTA"
| Dans ma bd d'une association, j'ai la photo de quelques associés.
| Pour voir la photo quand j'ouvre un formulaire :
|
| Private Sb Form_Corrent()
| Image1.Picture = c:Photos"& NrAssocie.Value & ".bmp"
| End Sub
|
| Ça marche bien si la photo existe, mais… quand il n'y a pas de photo
| j'aimerais voir la photo "X.bmp" (une photo sans visage).
En gardant le même principe...
Private Sb Form_Corrent()
'//vérifier si le fichier existe
if Dir("C:Photos" & NrAssocie.Value & ".bmp") <> "" Then
Image1.Picture = "C:Photos"& NrAssocie.Value & ".bmp"
else
Image1.Picture = "C:PhotosX.bmp"
end if
End Sub
"A COSTA" | Dans ma bd d'une association, j'ai la photo de quelques associés. | Pour voir la photo quand j'ouvre un formulaire : | | Private Sb Form_Corrent() | Image1.Picture = c:Photos"& NrAssocie.Value & ".bmp" | End Sub | | Ça marche bien si la photo existe, mais… quand il n'y a pas de photo | j'aimerais voir la photo "X.bmp" (une photo sans visage).
En gardant le même principe...
Private Sb Form_Corrent() '//vérifier si le fichier existe if Dir("C:Photos" & NrAssocie.Value & ".bmp") <> "" Then Image1.Picture = "C:Photos"& NrAssocie.Value & ".bmp" else Image1.Picture = "C:PhotosX.bmp" end if End Sub
"A COSTA" | Dans ma bd d'une association, j'ai la photo de quelques associés. | Pour voir la photo quand j'ouvre un formulaire : | | Private Sb Form_Corrent() | Image1.Picture = c:Photos"& NrAssocie.Value & ".bmp" | End Sub | | Ça marche bien si la photo existe, mais… quand il n'y a pas de photo | j'aimerais voir la photo "X.bmp" (une photo sans visage).
En gardant le même principe...
Private Sb Form_Corrent() '//vérifier si le fichier existe if Dir("C:Photos" & NrAssocie.Value & ".bmp") <> "" Then Image1.Picture = "C:Photos"& NrAssocie.Value & ".bmp" else Image1.Picture = "C:PhotosX.bmp" end if End Sub
"A COSTA"
| Dans ma bd d'une association, j'ai la photo de quelques associés.
| Pour voir la photo quand j'ouvre un formulaire :
|
| Private Sb Form_Corrent()
| Image1.Picture = c:Photos"& NrAssocie.Value & ".bmp"
| End Sub
|
| Ça marche bien si la photo existe, mais… quand il n'y a pas de photo
| j'aimerais voir la photo "X.bmp" (une photo sans visage).
En gardant le même principe...
Private Sb Form_Corrent()
'//vérifier si le fichier existe
if Dir("C:Photos" & NrAssocie.Value & ".bmp") <> "" Then
Image1.Picture = "C:Photos"& NrAssocie.Value & ".bmp"
else
Image1.Picture = "C:PhotosX.bmp"
end if
End Sub
"A COSTA" | Dans ma bd d'une association, j'ai la photo de quelques associés. | Pour voir la photo quand j'ouvre un formulaire : | | Private Sb Form_Corrent() | Image1.Picture = c:Photos"& NrAssocie.Value & ".bmp" | End Sub | | Ça marche bien si la photo existe, mais… quand il n'y a pas de photo | j'aimerais voir la photo "X.bmp" (une photo sans visage).
En gardant le même principe...
Private Sb Form_Corrent() '//vérifier si le fichier existe if Dir("C:Photos" & NrAssocie.Value & ".bmp") <> "" Then Image1.Picture = "C:Photos"& NrAssocie.Value & ".bmp" else Image1.Picture = "C:PhotosX.bmp" end if End Sub