photo on form

  • Thread starter Jean-Paul De Winter
  • Start date
J

Jean-Paul De Winter

Hi,
in my table I have a textfield containing the path where to find a photo.
However, I can not actually see the coorect photo on the form itself.
Can anybody please explain the procedure for chowing an individual photo
for each corresponding form.
Thanks
JP
 
M

Melinda

Hi Jean-Paul,
Try the following Knowledge Base Article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;285820

Since you already have a table and a form, you'll primarily just need the
code from this article. On your form, you'll have to add an "Image" (it's in
your Toolbox). It will prompt you for a file path. Just enter any old
photo, the module and other code will update the photo based on your path.

Hope that helps!
Melinda
 
J

Jean-Paul De Winter

Melinda said:
Hi Jean-Paul,
Try the following Knowledge Base Article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;285820

Since you already have a table and a form, you'll primarily just need the
code from this article. On your form, you'll have to add an "Image" (it's in
your Toolbox). It will prompt you for a file path. Just enter any old
photo, the module and other code will update the photo based on your path.

Hope that helps!
Melinda

Thanks Melinda for your kind reply
I wrote following code:

Private Sub Form_Current()
If IsNull(Me!foto) = False Then
Me![fotoken].Picture = Me![foto]
Else
Me![fotoken].Picture = "c:\DBI\logo.jpg"
End If
End Sub

This works just great now but, I get an errormessage when no photo is
found in the corresponding path.
Could you please explain what I should write to avoid this?
Maybe something like setting the image.visible to false or whatever.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top