?!!?§!!? Ton szFileName est déclaré comment ? C'est bien une chaîne de caractère ? Elle doit être initialisée à l'ouverture de ton formulaire mais déclarée comme précisé plus tôt.
En ce jour exceptionnel du vendredi 08/06/2007, tu nous as très généreusement gratifié du message suivant:
il me met incompatibilité du type.
Cordialement.
-- Cordialement, Ze Titi
Tout pour réussir avec Access : http://www.mpfa.info
?!!?§!!?
Ton szFileName est déclaré comment ? C'est bien une chaîne de caractère
? Elle doit être initialisée à l'ouverture de ton formulaire mais
déclarée comme précisé plus tôt.
En ce jour exceptionnel du vendredi 08/06/2007, tu nous as très
généreusement gratifié du message suivant:
il me met incompatibilité du type.
Cordialement.
--
Cordialement,
Ze Titi
Tout pour réussir avec Access :
http://www.mpfa.info
?!!?§!!? Ton szFileName est déclaré comment ? C'est bien une chaîne de caractère ? Elle doit être initialisée à l'ouverture de ton formulaire mais déclarée comme précisé plus tôt.
En ce jour exceptionnel du vendredi 08/06/2007, tu nous as très généreusement gratifié du message suivant:
il me met incompatibilité du type.
Cordialement.
-- Cordialement, Ze Titi
Tout pour réussir avec Access : http://www.mpfa.info
joalforever
Oui en est déclaré en string, et je l'ai bien déclaré déclaré p lus tot et elle est bien initialisé au début de mon formulaire.
Cordialement.
Oui en est déclaré en string, et je l'ai bien déclaré déclaré p lus tot
et elle est bien initialisé au début de mon formulaire.
Ca fait au moins 3 fois que je te demande ton code complet...
Est-ce que tu n'aurais pas déclaré ta variable en global dans ton formulaire et redéclaré cette même variable dans une procédure ?
En ce jour mémorable du lundi 11/06/2007, tu as entrepris la lourde tâche de taper sur ton clavier :
Est ce que quelqu'un peut m'aider svp.
Merci de vos réponse.
Cordialement.
-- Cordialement, Ze Titi
Tout pour réussir avec Access : http://www.mpfa.info
joalforever
Mon Code est:
Private Sub Clicher_Click() Dim nRemCnt As Long Dim nReso As Long Dim nFlash As Long Dim nPicCount As Long Dim nBattery As Long Dim nOpZoom As Long Dim SpotMode As Long Dim nIndexSize As Long Dim szFileName As String Dim nFileNum As Long Dim cnt As Long Dim bIndexBuff() As Byte
nCurrentCameras = 0 'Capture Me.Ryenv1.Capture 0
'Get picture count from camera nPicCount = Ryenv1.PropPicCount(0) If nPicCount <> 0 Then 'Set Current picture Ryenv1.PropCurrentPicture(0) = nPicCount
'Get index picture size from camera. nIndexSize = Ryenv1.PropIndexSize(0) 'Check index size If nIndexSize <> 0 Then 'Create buffer size of index ReDim bIndexBuff(nIndexSize) As Byte 'Get index picture from camera Ryenv1.GetIndex 0, nIndexSize, bIndexBuff 'Get index picture szFileName from camera 'szFileName = Ryenv1.PropFileName(0) 'Get file access ID nFileNum = FreeFile 'Set temporary file name szFileName = "C:alicePHOTOIndex " & Format(Now(), "dd- mm-yyyy hh-mm-ss") & ".jpg" Open szFileName For Binary As nFileNum 'Write index picture data Put nFileNum, 1, bIndexBuff 'Close index file Close nFileNum
MsgBox "A preview is saved at ""C:alicePHOTOIndex " & Format(Now(), "dd-mm-yyyy hh-mm-ss") & ".jpg"
End If End If SampleError: 'Check error. This check Camera error only. If Err.Number <> 0 Then MsgBox Err.Source & vbCrLf & Err.Description & vbCrLf & Err.Number End If End Sub
Voila et sa bug pour l'affichage de la photo avec le format date. Il me dit qu'il ne peut pas ouvrir le fichier.
Merci.
Mon Code est:
Private Sub Clicher_Click()
Dim nRemCnt As Long
Dim nReso As Long
Dim nFlash As Long
Dim nPicCount As Long
Dim nBattery As Long
Dim nOpZoom As Long
Dim SpotMode As Long
Dim nIndexSize As Long
Dim szFileName As String
Dim nFileNum As Long
Dim cnt As Long
Dim bIndexBuff() As Byte
nCurrentCameras = 0
'Capture
Me.Ryenv1.Capture 0
'Get picture count from camera
nPicCount = Ryenv1.PropPicCount(0)
If nPicCount <> 0 Then
'Set Current picture
Ryenv1.PropCurrentPicture(0) = nPicCount
'Get index picture size from camera.
nIndexSize = Ryenv1.PropIndexSize(0)
'Check index size
If nIndexSize <> 0 Then
'Create buffer size of index
ReDim bIndexBuff(nIndexSize) As Byte
'Get index picture from camera
Ryenv1.GetIndex 0, nIndexSize, bIndexBuff
'Get index picture szFileName from camera
'szFileName = Ryenv1.PropFileName(0)
'Get file access ID
nFileNum = FreeFile
'Set temporary file name
szFileName = "C:alicePHOTOIndex " & Format(Now(), "dd-
mm-yyyy hh-mm-ss") & ".jpg"
Open szFileName For Binary As nFileNum
'Write index picture data
Put nFileNum, 1, bIndexBuff
'Close index file
Close nFileNum
MsgBox "A preview is saved at ""C:alicePHOTOIndex " &
Format(Now(), "dd-mm-yyyy hh-mm-ss") & ".jpg"
End If
End If
SampleError:
'Check error. This check Camera error only.
If Err.Number <> 0 Then
MsgBox Err.Source & vbCrLf & Err.Description & vbCrLf &
Err.Number
End If
End Sub
Private Sub Clicher_Click() Dim nRemCnt As Long Dim nReso As Long Dim nFlash As Long Dim nPicCount As Long Dim nBattery As Long Dim nOpZoom As Long Dim SpotMode As Long Dim nIndexSize As Long Dim szFileName As String Dim nFileNum As Long Dim cnt As Long Dim bIndexBuff() As Byte
nCurrentCameras = 0 'Capture Me.Ryenv1.Capture 0
'Get picture count from camera nPicCount = Ryenv1.PropPicCount(0) If nPicCount <> 0 Then 'Set Current picture Ryenv1.PropCurrentPicture(0) = nPicCount
'Get index picture size from camera. nIndexSize = Ryenv1.PropIndexSize(0) 'Check index size If nIndexSize <> 0 Then 'Create buffer size of index ReDim bIndexBuff(nIndexSize) As Byte 'Get index picture from camera Ryenv1.GetIndex 0, nIndexSize, bIndexBuff 'Get index picture szFileName from camera 'szFileName = Ryenv1.PropFileName(0) 'Get file access ID nFileNum = FreeFile 'Set temporary file name szFileName = "C:alicePHOTOIndex " & Format(Now(), "dd- mm-yyyy hh-mm-ss") & ".jpg" Open szFileName For Binary As nFileNum 'Write index picture data Put nFileNum, 1, bIndexBuff 'Close index file Close nFileNum
MsgBox "A preview is saved at ""C:alicePHOTOIndex " & Format(Now(), "dd-mm-yyyy hh-mm-ss") & ".jpg"
End If End If SampleError: 'Check error. This check Camera error only. If Err.Number <> 0 Then MsgBox Err.Source & vbCrLf & Err.Description & vbCrLf & Err.Number End If End Sub
ne pouvais pas t'afficher le bon fichier puisque la fonction Format(Now(), "dd-mm-yyyy hh-mm-ss") te renvoit forcément une valeur différente de celle qui a été utilisée pour l'enregistrement et que le chemin que tu construis pour afficher la photo n'est donc pas bon !
Tu devrais avoir quelque chose du style :
Option Compare Database Dim szFileName As String
Private Sub Clicher_Click() Dim nRemCnt As Long Dim nReso As Long Dim nFlash As Long Dim nPicCount As Long Dim nBattery As Long Dim nOpZoom As Long Dim SpotMode As Long Dim nIndexSize As Long Dim nFileNum As Long Dim cnt As Long Dim bIndexBuff() As Byte nCurrentCameras = 0 'Capture Me.Ryenv1.Capture 0 'Get picture count from camera nPicCount = Ryenv1.PropPicCount(0) If nPicCount <> 0 Then 'Set Current picture Ryenv1.PropCurrentPicture(0) = nPicCount 'Get index picture size from camera. nIndexSize = Ryenv1.PropIndexSize(0) 'Check index size If nIndexSize <> 0 Then 'Create buffer size of index ReDim bIndexBuff(nIndexSize) As Byte 'Get index picture from camera Ryenv1.GetIndex 0, nIndexSize, bIndexBuff 'Get index picture szFileName from camera 'szFileName = Ryenv1.PropFileName(0) 'Get file access ID nFileNum = FreeFile 'Set temporary file name szFileName = "C:alicePHOTOIndex " & Format(Now(), "dd-mm-yyyy hh-mm-ss") & ".jpg" Open szFileName For Binary As nFileNum 'Write index picture data Put nFileNum, 1, bIndexBuff 'Close index file Close nFileNum MsgBox "A preview is saved at " & szFileName End If End If SampleError: 'Check error. This check Camera error only. If Err.Number <> 0 Then MsgBox Err.Source & vbCrLf & Err.Description & vbCrLf & Err.Number End If End Sub
Private Sub afficher_Click() Me.Image59.Picture = "" Me.Image59.Picture = szFileName End Sub
En ce jour exceptionnel du lundi 11/06/2007, tu nous as très généreusement gratifié du message suivant:
Mon Code est:
Private Sub Clicher_Click() Dim nRemCnt As Long Dim nReso As Long Dim nFlash As Long Dim nPicCount As Long Dim nBattery As Long Dim nOpZoom As Long Dim SpotMode As Long Dim nIndexSize As Long Dim szFileName As String Dim nFileNum As Long Dim cnt As Long Dim bIndexBuff() As Byte
nCurrentCameras = 0 'Capture Me.Ryenv1.Capture 0
'Get picture count from camera nPicCount = Ryenv1.PropPicCount(0) If nPicCount <> 0 Then 'Set Current picture Ryenv1.PropCurrentPicture(0) = nPicCount
'Get index picture size from camera. nIndexSize = Ryenv1.PropIndexSize(0) 'Check index size If nIndexSize <> 0 Then 'Create buffer size of index ReDim bIndexBuff(nIndexSize) As Byte 'Get index picture from camera Ryenv1.GetIndex 0, nIndexSize, bIndexBuff 'Get index picture szFileName from camera 'szFileName = Ryenv1.PropFileName(0) 'Get file access ID nFileNum = FreeFile 'Set temporary file name szFileName = "C:alicePHOTOIndex " & Format(Now(), "dd- mm-yyyy hh-mm-ss") & ".jpg" Open szFileName For Binary As nFileNum 'Write index picture data Put nFileNum, 1, bIndexBuff 'Close index file Close nFileNum
MsgBox "A preview is saved at ""C:alicePHOTOIndex " & Format(Now(), "dd-mm-yyyy hh-mm-ss") & ".jpg"
End If End If SampleError: 'Check error. This check Camera error only. If Err.Number <> 0 Then MsgBox Err.Source & vbCrLf & Err.Description & vbCrLf & Err.Number End If End Sub
ne pouvais pas t'afficher le bon fichier puisque la fonction
Format(Now(), "dd-mm-yyyy hh-mm-ss")
te renvoit forcément une valeur différente de celle qui a été utilisée pour l'enregistrement et que le chemin que tu construis pour afficher la photo n'est donc pas bon !
Tu devrais avoir quelque chose du style :
Option Compare Database
Dim szFileName As String
Private Sub Clicher_Click()
Dim nRemCnt As Long
Dim nReso As Long
Dim nFlash As Long
Dim nPicCount As Long
Dim nBattery As Long
Dim nOpZoom As Long
Dim SpotMode As Long
Dim nIndexSize As Long
Dim nFileNum As Long
Dim cnt As Long
Dim bIndexBuff() As Byte
nCurrentCameras = 0
'Capture
Me.Ryenv1.Capture 0
'Get picture count from camera
nPicCount = Ryenv1.PropPicCount(0)
If nPicCount <> 0 Then
'Set Current picture
Ryenv1.PropCurrentPicture(0) = nPicCount
'Get index picture size from camera.
nIndexSize = Ryenv1.PropIndexSize(0)
'Check index size
If nIndexSize <> 0 Then
'Create buffer size of index
ReDim bIndexBuff(nIndexSize) As Byte
'Get index picture from camera
Ryenv1.GetIndex 0, nIndexSize, bIndexBuff
'Get index picture szFileName from camera
'szFileName = Ryenv1.PropFileName(0)
'Get file access ID
nFileNum = FreeFile
'Set temporary file name
szFileName = "C:alicePHOTOIndex " & Format(Now(), "dd-mm-yyyy hh-mm-ss") & ".jpg"
Open szFileName For Binary As nFileNum
'Write index picture data
Put nFileNum, 1, bIndexBuff
'Close index file
Close nFileNum
MsgBox "A preview is saved at " & szFileName
End If
End If
SampleError:
'Check error. This check Camera error only.
If Err.Number <> 0 Then
MsgBox Err.Source & vbCrLf & Err.Description & vbCrLf & Err.Number
End If
End Sub
Private Sub afficher_Click()
Me.Image59.Picture = ""
Me.Image59.Picture = szFileName
End Sub
En ce jour exceptionnel du lundi 11/06/2007, tu nous as très généreusement gratifié du message suivant:
Mon Code est:
Private Sub Clicher_Click()
Dim nRemCnt As Long
Dim nReso As Long
Dim nFlash As Long
Dim nPicCount As Long
Dim nBattery As Long
Dim nOpZoom As Long
Dim SpotMode As Long
Dim nIndexSize As Long
Dim szFileName As String
Dim nFileNum As Long
Dim cnt As Long
Dim bIndexBuff() As Byte
nCurrentCameras = 0
'Capture
Me.Ryenv1.Capture 0
'Get picture count from camera
nPicCount = Ryenv1.PropPicCount(0)
If nPicCount <> 0 Then
'Set Current picture
Ryenv1.PropCurrentPicture(0) = nPicCount
'Get index picture size from camera.
nIndexSize = Ryenv1.PropIndexSize(0)
'Check index size
If nIndexSize <> 0 Then
'Create buffer size of index
ReDim bIndexBuff(nIndexSize) As Byte
'Get index picture from camera
Ryenv1.GetIndex 0, nIndexSize, bIndexBuff
'Get index picture szFileName from camera
'szFileName = Ryenv1.PropFileName(0)
'Get file access ID
nFileNum = FreeFile
'Set temporary file name
szFileName = "C:alicePHOTOIndex " & Format(Now(), "dd-
mm-yyyy hh-mm-ss") & ".jpg"
Open szFileName For Binary As nFileNum
'Write index picture data
Put nFileNum, 1, bIndexBuff
'Close index file
Close nFileNum
MsgBox "A preview is saved at ""C:alicePHOTOIndex " &
Format(Now(), "dd-mm-yyyy hh-mm-ss") & ".jpg"
End If
End If
SampleError:
'Check error. This check Camera error only.
If Err.Number <> 0 Then
MsgBox Err.Source & vbCrLf & Err.Description & vbCrLf &
Err.Number
End If
End Sub
ne pouvais pas t'afficher le bon fichier puisque la fonction Format(Now(), "dd-mm-yyyy hh-mm-ss") te renvoit forcément une valeur différente de celle qui a été utilisée pour l'enregistrement et que le chemin que tu construis pour afficher la photo n'est donc pas bon !
Tu devrais avoir quelque chose du style :
Option Compare Database Dim szFileName As String
Private Sub Clicher_Click() Dim nRemCnt As Long Dim nReso As Long Dim nFlash As Long Dim nPicCount As Long Dim nBattery As Long Dim nOpZoom As Long Dim SpotMode As Long Dim nIndexSize As Long Dim nFileNum As Long Dim cnt As Long Dim bIndexBuff() As Byte nCurrentCameras = 0 'Capture Me.Ryenv1.Capture 0 'Get picture count from camera nPicCount = Ryenv1.PropPicCount(0) If nPicCount <> 0 Then 'Set Current picture Ryenv1.PropCurrentPicture(0) = nPicCount 'Get index picture size from camera. nIndexSize = Ryenv1.PropIndexSize(0) 'Check index size If nIndexSize <> 0 Then 'Create buffer size of index ReDim bIndexBuff(nIndexSize) As Byte 'Get index picture from camera Ryenv1.GetIndex 0, nIndexSize, bIndexBuff 'Get index picture szFileName from camera 'szFileName = Ryenv1.PropFileName(0) 'Get file access ID nFileNum = FreeFile 'Set temporary file name szFileName = "C:alicePHOTOIndex " & Format(Now(), "dd-mm-yyyy hh-mm-ss") & ".jpg" Open szFileName For Binary As nFileNum 'Write index picture data Put nFileNum, 1, bIndexBuff 'Close index file Close nFileNum MsgBox "A preview is saved at " & szFileName End If End If SampleError: 'Check error. This check Camera error only. If Err.Number <> 0 Then MsgBox Err.Source & vbCrLf & Err.Description & vbCrLf & Err.Number End If End Sub
Private Sub afficher_Click() Me.Image59.Picture = "" Me.Image59.Picture = szFileName End Sub
En ce jour exceptionnel du lundi 11/06/2007, tu nous as très généreusement gratifié du message suivant:
Mon Code est:
Private Sub Clicher_Click() Dim nRemCnt As Long Dim nReso As Long Dim nFlash As Long Dim nPicCount As Long Dim nBattery As Long Dim nOpZoom As Long Dim SpotMode As Long Dim nIndexSize As Long Dim szFileName As String Dim nFileNum As Long Dim cnt As Long Dim bIndexBuff() As Byte
nCurrentCameras = 0 'Capture Me.Ryenv1.Capture 0
'Get picture count from camera nPicCount = Ryenv1.PropPicCount(0) If nPicCount <> 0 Then 'Set Current picture Ryenv1.PropCurrentPicture(0) = nPicCount
'Get index picture size from camera. nIndexSize = Ryenv1.PropIndexSize(0) 'Check index size If nIndexSize <> 0 Then 'Create buffer size of index ReDim bIndexBuff(nIndexSize) As Byte 'Get index picture from camera Ryenv1.GetIndex 0, nIndexSize, bIndexBuff 'Get index picture szFileName from camera 'szFileName = Ryenv1.PropFileName(0) 'Get file access ID nFileNum = FreeFile 'Set temporary file name szFileName = "C:alicePHOTOIndex " & Format(Now(), "dd- mm-yyyy hh-mm-ss") & ".jpg" Open szFileName For Binary As nFileNum 'Write index picture data Put nFileNum, 1, bIndexBuff 'Close index file Close nFileNum
MsgBox "A preview is saved at ""C:alicePHOTOIndex " & Format(Now(), "dd-mm-yyyy hh-mm-ss") & ".jpg"
End If End If SampleError: 'Check error. This check Camera error only. If Err.Number <> 0 Then MsgBox Err.Source & vbCrLf & Err.Description & vbCrLf & Err.Number End If End Sub
Voila et sa bug pour l'affichage de la photo avec le format date. Il me dit qu'il ne peut pas ouvrir le fichier.
Merci.
-- Cordialement, Ze Titi
Tout pour réussir avec Access : http://www.mpfa.info
joalforever
J'ai fait exactement ce qu'il m'avait dit et ceci ne m'affiche rien. Il me met plus de message d'erreur mais il n'affiche plus c'est pour sa que je demande ce que je peut faire.Si tu as une autre idée. Merci
Cordialement
J'ai fait exactement ce qu'il m'avait dit et ceci ne m'affiche rien.
Il me met plus de message d'erreur mais il n'affiche plus c'est pour
sa que je demande ce que je peut faire.Si tu as une autre idée.
Merci
J'ai fait exactement ce qu'il m'avait dit et ceci ne m'affiche rien. Il me met plus de message d'erreur mais il n'affiche plus c'est pour sa que je demande ce que je peut faire.Si tu as une autre idée. Merci
Cordialement
ze Titi
Tu as essayé le code que je viens de te proposer ?
En ce jour mémorable du lundi 11/06/2007, tu as entrepris la lourde tâche de taper sur ton clavier :
J'ai fait exactement ce qu'il m'avait dit et ceci ne m'affiche rien. Il me met plus de message d'erreur mais il n'affiche plus c'est pour sa que je demande ce que je peut faire.Si tu as une autre idée. Merci
Cordialement
-- Cordialement, Ze Titi
Tout pour réussir avec Access : http://www.mpfa.info
Tu as essayé le code que je viens de te proposer ?
En ce jour mémorable du lundi 11/06/2007, tu as entrepris la lourde
tâche de taper sur ton clavier :
J'ai fait exactement ce qu'il m'avait dit et ceci ne m'affiche rien.
Il me met plus de message d'erreur mais il n'affiche plus c'est pour
sa que je demande ce que je peut faire.Si tu as une autre idée.
Merci
Cordialement
--
Cordialement,
Ze Titi
Tout pour réussir avec Access :
http://www.mpfa.info
Tu as essayé le code que je viens de te proposer ?
En ce jour mémorable du lundi 11/06/2007, tu as entrepris la lourde tâche de taper sur ton clavier :
J'ai fait exactement ce qu'il m'avait dit et ceci ne m'affiche rien. Il me met plus de message d'erreur mais il n'affiche plus c'est pour sa que je demande ce que je peut faire.Si tu as une autre idée. Merci
Cordialement
-- Cordialement, Ze Titi
Tout pour réussir avec Access : http://www.mpfa.info