O
OzPete
Hi all,
Thanks to Kelvin's support, I now have the image control working 24/7 and
displays pretty little pictures of my clients.
Only problem I get now is that if I go to the next record/client, and I
don't have an image [photofile] for him/her, the previous image remains, and
I cannot work out how to clear or refresh the image control, so that no
photo shows up if no photo file exists...
The [photofile] field for the client is often therefore blank, but the
previous image remains.
Code for the form to get the image...
Private Sub Form_Current()
On Error Resume Next
Me![Image40].Picture = Application.CurrentProject.Path & "\" & [PhotoFile]
End Sub
Code for the [photofile] field after update
Private Sub PhotoFile_AfterUpdate()
On Error Resume Next
Me![Image40].Picture = Application.CurrentProject.Path & "\" & [PhotoFile]
End Sub
Any clues, gang? tia
OzPete
Thanks to Kelvin's support, I now have the image control working 24/7 and
displays pretty little pictures of my clients.
Only problem I get now is that if I go to the next record/client, and I
don't have an image [photofile] for him/her, the previous image remains, and
I cannot work out how to clear or refresh the image control, so that no
photo shows up if no photo file exists...
The [photofile] field for the client is often therefore blank, but the
previous image remains.
Code for the form to get the image...
Private Sub Form_Current()
On Error Resume Next
Me![Image40].Picture = Application.CurrentProject.Path & "\" & [PhotoFile]
End Sub
Code for the [photofile] field after update
Private Sub PhotoFile_AfterUpdate()
On Error Resume Next
Me![Image40].Picture = Application.CurrentProject.Path & "\" & [PhotoFile]
End Sub
Any clues, gang? tia
OzPete