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!

How to display image on report from path to image stored in a table

Status
Not open for further replies.

DPROMICS

Technical User
Nov 5, 2003
108
US
I want to have a "letter head" image displayed on a report. Easy enough. Ahh, but, I would like to have the "letter head" image displayed on the report pulled in to the report through the path where the image is located stored in a field in a table.

The table Tbl_Medical_Practice_Demographics has an entry called Rpt_Header_Path. That table entry contains the path to where the "letter head" image is actually stored.

The idea is that it is easy to change the doctors names on the "letter head" and then save it as an image. Its a pain to individualy change that information on every report when ever a doctor comes in to the medical practice and/or leaves the practice. Having the "letter head" image displayed on each report and that image found through a path entry to it from an entry in a table entry would resolve this problem.

The "letter head" image is in the form of a gif, tiff, or jpeg file format and stored where the Access app's database is stored. The Access app and data base are split. The Access app is stored at <logical drive letter>:\ECMR and its database at <logical drive letter>:\ECMR\ECMR_DB. The logical drive letter can change depending on where its stored on a PC or file-server.

My problem is that I am having a problem figuring out how to set this up. Any body done this before and know how to do it?
 
This is a fairly definitive thread:

thread702-289543

 
Thanks Remou,

I'll look at the thread when I have a moment latter today.

I tried several searches before submitting a post. Didn't find anything. I guess I didn't word my searches correctly.

Best Regards,
 
Well Remou,

The above thread didn't do it. They made the assumption that the report was bound to a table. They also assume everything in the report is under the Details section. Or at least that is what I perceived they did in the first reply of the thread.

My reports are bound to a query that collects the data for a patient's clinic visit. Also, the letter head image is under the Report Header section while the data is under the Details section.

When I tried the solution suggested on the first part of the thread the function couldn't find the field because there is no table name associated with the report. I tried changing the syntax in the function to include the table name along with the field name. But I kept getting an error that the function couldn't find the table's field.

Therefore, may be the method described in the first part of the thread is the way to do it and in the function I didn't get the syntax correct for the location of the table's field.

Under the Report Header section in its propertise I setup a function under OnFormat.

The syntax I tried was:

Me![ImagePath].Properties("Picture") = Me![Tbl_ECMR_Medical_Practice_Demographics].[Letter_Head_Path]

May be I don't have the syntax correct for defining the table and the path entry in it in the line of code.

It really shouldn't take a lot of code to do this. Basically the path to the image needs to be plunked in to the Path section of the Image box.

Any body have any suggestions? Solutions?

 
The MS site talks about BMP image format. Although TIFF or JPG should work as well.

However, I still don't see the syntax that includes both the table name and the table's field in the line of code.
 
Use DlookUp to get the image path from the table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top