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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture in my report 34

Status
Not open for further replies.

strantheman

Programmer
Mar 12, 2001
333
0
0
US
Ive searched all of the Access forums, and I haven't found a solution that works. This seems like a very common procedure so im sure someone out there can help.

My ITEM table looks like this:

name | imagepath
-----------------------------------------------
Linksys Cable/DSL Router | d:\lsBEFSR41.jpg
Netgear Switch | d:\ngFS105.jpg

Name is the name of the product, and imagepath is where the photo is stored on my drive. My report pulls NAME, IMAGEPATH from ITEM table for the specified ID. I want to show the name of the product, and its corresponding picture on my report.

For this discussion, lets say the two objects on my report are named itemName and itemImage. I would assume this is as simple as setting some property of itemImage to the IMAGEPATH field, but ive been unable to figure this out. Please provide any help that you can. Id be willing to receive an email with a sample MDB file if thats what I have to do.

thanks in advance, im really hurtin here.
 
Here is an update to the subject matter here. Follow the link to this thread: thread703-856454 This thread deals with displaying photos in a subform and how to do it effeciently. The final posting by WirelessBen provides for a very fast way of doing this. I thought it would be good to post the link here for all interested in Pictures in Reports to look at.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Interesting thread.

I have inserted a picture box or bound OLE object. I want when the user double click the object they can browse for the pic and update the picture.

How do u do this? I have disabled the shortcut menu in access so user can't right click to insert object.

ANy help?
 
I had browse and found this same code late yesterday before your post.
Thanks. it worked like a charm. Great stuff.
 
Hi,


I'm kind of stuck with a similar problem, and this seems to be the "image on form" authoritative thread :) So here goes...


I have a parts database that corresponds to lots of CAD files on a network drive. I want to be able to show the _Windows thumbnail icon_ of the file (as seen in Explorer, thumbnail view) when viewing the detail form of that record.

I've found a lot on showing thumbnails of image files (.JPG, .GIF, etc.), but nothing on displaying the native file icon thumbnail itself.


Thanks!
 
Help me out here. You said:

I've found a lot on showing thumbnails of image files (.JPG, .GIF, etc.), but nothing on displaying the native file icon thumbnail itself.

Just what do you mean by "native file icon thumbnail itself". I don't know what the difference is here. Maybe I can help if you can explain. Thanks.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Hi Bob,

By file icon thumbnail, I mean the ones explorer creates in thumbs.db, the ones shown in explorer's thumbnail (versus list, details, etc.) view, as here:


Each filename in a network drive corresponds to a record, and when the user accesses the detail form for that record, I want to show the thumbnail as shown above by Windows explorer.
 
Any ideas?

I'm 98% finished this project, pending this last detail!


Thanks!
 
At this point I don't any ideas. But, I will work on it when I can and post a suggestion if I come up with any.

Good luck.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Hi Bob,

Great answers here, I have a question for you

Do you you know of any way to take the image (data) that is displayed in the picture control and save the data to a disk file that can then be viewed, printed or edited with a graphics program?

Thanks,
Hap..

Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
I believe that you can just right-click the image control and select Save Image As and following the browsing prompt menu to store it on your computer. Just name it as you wish.

This image should be copied to your computer. Let me know how that works.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
rhyno2k,
By the looks of things, what you are trying to do isn't easy. Check out for some VB code that may get you started.

hap,
If you are know the path of the image you want to edit then you could just "shell" to the image editor of your choice and pass the image filename as a parameter. Most apps try to use parameters as files to open.
Code:
shell "c:\Windows\paint.exe " & me.txtImagePath
'note the space after the exe file

hth

Ben

----------------------------------------------
Ben O'Hara "Where are all the stupid people from...
...And how'd they get so dumb?"
rockband.gif
NoFX-The Decline
----------------------------------------------
 
Hi Bob,

Thanks for the idea, but No, that does not seem to work.
I know that I can copy and paste, but I just would like some vba code method to do a save without having to go through all the other steps. You know, pick one of my images and just save it to disk.

Hi Ben,
Thanks for the suggestion, but I do not think you understand my problem.

The image is stored in the database. It is not stored on disk. I want to scroll through different images and when I find the one I want, press a button and it will be saved. The scrolling works, the images are stored and working, letting the user pick a file name works, but the actual disk file that my app writes is not correct, yet the image stored in my database is good.

Thanks,
Hap

Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
I see now. I thought you were just storing the filenames in the database, not just the pictures.
Is any good to you?

B

----------------------------------------------
Ben O'Hara "Where are all the stupid people from...
...And how'd they get so dumb?"
rockband.gif
NoFX-The Decline
----------------------------------------------
 
Thanks Hap. I remain in awe of the stuff Stephen Lebans does. Most of it stuff I wouldn't even think of trying, never mind get working!
I suppose that's why he's an MVP and I'm not!

B

----------------------------------------------
Ben O'Hara "Where are all the stupid people from...
...And how'd they get so dumb?"
rockband.gif
NoFX-The Decline
----------------------------------------------
 
oharab: Glad that you found what you are looking for. Maybe you could post the code that you finally decided to use so that others reading this thread can benefit from it. I would think that a button to copy and save the image to a hard drive is something that would be useful.

Just thought it would help here without having others have to dig to find what you found.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Hap was looking, not me! Perhaps he'll oblige us!

Ben

----------------------------------------------
Ben O'Hara "Where are all the stupid people from...
...And how'd they get so dumb?"
rockband.gif
NoFX-The Decline
----------------------------------------------
 
Hello.

This is a design question I suppose, more than anything.

I am working on an artisania inventory db, and want to make a pick list form. The purpose is to be able to select a item based on the picture, and then either add another to the inventory stock or edit its description.

I have it all working using OLE embedding or linking using continuous forms, but the size and thus processing overhead will be too much given 1000s of images expected.

The problem is if I use just a link to an external file using On Current, all the images change to the current one, defeating the purpose of a list. I have not been able to think of a way to both have this 'picklist of images' and still keep the database trim by not using the OLE functions.

 
I understand your problem here. Just like having a combobox on a continuous form and if you pick on one row all the rows take on that value.

One way might be to have a picture control seperate from the subform continuous form. Actually have it housed on the main form. As you click on an item in the continuous form the OnCurrent event could be programmed with code to update the link info of the picture control. This way you only are linking to your pics with a single control and the user can still see the item.

Maybe this technique will work and maybe not. Don't know if you must be able to have the users scroll visibly through the pics or not.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top