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

display an image from a path in a table

Status
Not open for further replies.

valkyry

Technical User
Jan 14, 2002
165
US
Hello,
I can't figure out the OLE Object. It's not working for me.

I have a field in a database (SQL Server table) that stores the image name. example: logo.jpg

I have created a table in MS Access of the fields I need including the image field but added the path with the image name of only the data that is needed.

I need to create a label that will display the image (picture) not the field (the path) and I can't get this work.

Please help!
 
Add an image control to your report and name it imgMyImage. Add a text box to the same section of your report that is bound to your complete image file name with the drive and folder information. Name the text box "txtImageFile".

In the On Print event of report section, add code in the event module like:
Code:
Me.imgMyImage.Picture = Me.txtImageFile

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hello and thank you!
I believe I did everything but when I preview I get
can't find the macro "Me"

Why would it mention a macro??

thank you for your help!
 
You entered the line of code in the Property rather than opening the event procedure (code window).

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Ah, yes it worked!

Any idea how I can get the sizes of each image to "expand" or "reduce" depending on the image size itself?

thanks again! this was awesome help!
 
You might want to search around The solution might depend on your version.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hey,
I figured it out
changed it the Clip to Zoom and it worked

thanks again!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top