Getting External Images

danian

Registered User.
Local time
Today, 10:16
Joined
Jun 27, 2005
Messages
54
I have a DB that has a table called tblproductList. In the table i have a field called Image. I have made this field a Text Field. I have entered product details and have entered ghd.jpg in the Image field. this reflects the image i have stored in the same directory as the DB. I have a form and i want to call the image into the form. How is this done?

Thanks
D
 
Have you reviewed the "Employees" form in the NorthWind sample db that comes with Access?
 
I have looked at the Northwinds mdb and the table employees. This is a OLE object and stored the image inside the mdb. I don’t want this. I want to have my images external and point a link to them. I then want to be able to call the images into a form.

Correct me if I am wrong

Thanks
D
 
I think you need to take another look. The images are *not* stored in the mdb but are outside it where you wanted them to be. I believe this is exactly the code for which you were looking. Post back if you need additional assistance.

Edit: The code you need is in the Current event of the Employees form.
 
this is an option to display images

Hello,

I had the same problem and i fixed it with the following solution. Insert an image in a form, it doesn't matter which one. Rename the frame to ImageFrame. Insert the path of the image to a variable named Imagepath in the table. And third of all, insert the codes below.

Please let me hear if you succeed or not.

Private Sub Form_Current()
On Error Resume Next
Me![ImageFrame].Picture = Me![Imagepath]
Me.Refresh
End Sub

Private Sub ImagePath_AfterUpdate()
On Error Resume Next
Me![ImageFrame].Picture = Me![Imagepath]
Me.Refresh
End Sub
 
I forgot to mention one problem with this code. When i add a new record the pictureframe still shows the image of the record from where i added a new record. Does somebody know how i can refresh this? Or how i can show a default image?
 

Users who are viewing this thread

Back
Top Bottom