Assuming that Me![foto] contains the path to the (missing) photo, try:
Private Sub Form_Current()
If IsNull(Me!foto) = False Then
If Len(Me![foto]) > 0 Then
Me![fotoken].Picture = Me![foto]
Else
Me![fotoken].Picture = "c:\DBI\logo.jpg"
End If
Else
Me![fotoken].Picture = "c:\DBI\logo.jpg"
End If
End Sub

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>I wrote following code:
>
[quoted text clipped - 13 lines]
> Thanks
> JP
Jean-Paul De Winter - 19 Nov 2005 07:45 GMT
> Assuming that Me![foto] contains the path to the (missing) photo, try:
>
[quoted text clipped - 9 lines]
> End If
> End Sub
I don't think this will work...
If len(Me!foto)> 0 but the path to to the photo is wrong so the photo
can't be found (deleted as ex.) what then?
Thnaks
Douglas J. Steele - 19 Nov 2005 12:08 GMT
Sorry: typing too quickly.
Rather than Len(Me![foto]) > 0, it should be Len(Dir(Me![foto])) > 0
The Dir function returns the name of the file (no path) if the file exists,
or an empty string if it doesn't.
My apologies for the confusion.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>> Assuming that Me![foto] contains the path to the (missing) photo, try:
>>
[quoted text clipped - 14 lines]
> can't be found (deleted as ex.) what then?
> Thnaks