Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pictures

Status
Not open for further replies.

andyukcy

Technical User
Jul 9, 2003
64
Hi,
i have a database to store my products and i have a table field call pictures (OLE Object as data type)
I have a form for the products and the pictures field. Is there a way to add a browse button, doing the same job as right clicking on it and select "Isert Object", where i can select the image of the product and this to be shown in my form using the LINK object?

Thank you
Andy Uk Cy
 
check out this thread: thread702-289543

There are some detail techniques and design considerations that you should take a look at in your database and form design. Let me know if I can help you here.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
do you have a working sample?

thank you
 
No, I don't have a sample database. Let me just shortcut the concept here for you. Rather than select and embedd the pictures in your database which will grow your database size considerable you can dynamically through code load up the Image control's .picture property in a form or a report with the path to the images on your computer or server.

This can easily be done by coding in the path to a specific folder location that houses all of your pictures. The picture names can be named in some format that relates to a specific record. Like ProductID or EmpID. Then the only code necessary in the Detail section of a report or the OnCurrent event procedure of a form would be something like the following:

Code:
Me.[[i]controlname[/i]].Picture = "C:\database\images\" & Me![ProductID] & ".jpg"

This will loadup the image control with the picture stored as a .jpg file on your computer. No need to do any picking and embedding at all.

Hopefully this helps you a little with understanding a very effecient way of displaying pictures in ACCESS. Post back if you have any further questions.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
thank you, but i kinda like to have a browse button.
Thank you
Andreas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top