Has anyone tried this? I was not able to get it to work.
faq181-279
What this does...
It loads a picture ie .jpg or .gif or .bmp into an Image control on the form. So as you navigate through the records it automatically loads a picture from the hard drive.
Note: It might be slow if the picture is large or you have a slow machine. A Pentium II or better should be fine.
Benefits: Can have thousands/10's of thousands of pictures and does not Bloat database. Becasue no pictures are inside the database they are left on the hard drive.
Steps:
1. Add an "Image" control to the form.
Follow the prompts and load a picture of the type you will be using.
2. Open the properties of the image and remove the picture.
3. Put this code in the forms On_current event
---------------------------------------
Private Sub Form_Current()
If Me![ID] <> 0 Then
Me!Image14.Picture = "p:\ViewPhotos\Photos\" & Me![ID] & ".jpg"
Label20.Caption = "File: " & " p:\ViewPhotos\Photos\" & Me![ID] & ".jpg"
End If
End Sub
----------------------------------
The Label20 simply shows the path of the picture for troubleshooting purposes.
faq181-279
What this does...
It loads a picture ie .jpg or .gif or .bmp into an Image control on the form. So as you navigate through the records it automatically loads a picture from the hard drive.
Note: It might be slow if the picture is large or you have a slow machine. A Pentium II or better should be fine.
Benefits: Can have thousands/10's of thousands of pictures and does not Bloat database. Becasue no pictures are inside the database they are left on the hard drive.
Steps:
1. Add an "Image" control to the form.
Follow the prompts and load a picture of the type you will be using.
2. Open the properties of the image and remove the picture.
3. Put this code in the forms On_current event
---------------------------------------
Private Sub Form_Current()
If Me![ID] <> 0 Then
Me!Image14.Picture = "p:\ViewPhotos\Photos\" & Me![ID] & ".jpg"
Label20.Caption = "File: " & " p:\ViewPhotos\Photos\" & Me![ID] & ".jpg"
End If
End Sub
----------------------------------
The Label20 simply shows the path of the picture for troubleshooting purposes.