Images linked to data

a_ud

Registered User.
Local time
Today, 01:38
Joined
Mar 5, 2011
Messages
16
I'm building a report in Access 2003 that links data to images.

The problem is like this:

Query DATA: ID / Data 1 / Data 2 / Data 3
tbl IMAGES: ID / Image

What I'd like is to build a report that, instead of showing Data 1 (actually, Round(Data 1, same for 2-3) shows the corresponding image (if Data1 is 23, the image 23 in table IMAGE). The report should therefore show 3 different images, one for each of the data.

My questions (from easy to complex) are:

1) Assuming field Image is OLE object (guess this is easiest way to solve this), What format is best for the images? Tried PNG, doesn´t show, is BMP the only one available?

2) If I run the query to get the values to populate the report, how do I link the 3 fields to the table IMAGES? I know how to link tables, but is Round(Data 1), a calculated value, linkable?

3) What are the relationships between the QUERY and TBL IMAGE? I mean, if each page of the report needs 3 images, would then ID in tbl IMAGE be the one, and each record in the query be the N? Or how then?

Thanks in advance, a.

ps: any alternate solutions not involving something really tricky are welcome.
 
It can be done via nice query. I'm not good query writer on a knee, but i'll try to give you a tip.

If we want 1 image and Data is a table, it is done like this:
GET ID, Data1, Image FROM Data JOIN Images WHERE Data1=Images.ID

For 3 images it is a bit more complex:

GET ID, Data1, Data2, Data3, Images1.Image, Images2.Image, Images3.Image FROM Data JOIN Images as Images1, Images as Images2, Images as Images3 WHERE Data1=Images1.ID, Data2=Images2.ID, Data3=Images3.ID

On other hand, if you use Access 2007+, you can store your pictures as files in some folder and use regular Picture control. You need to bind it to text field in your query, that will provide the filename to display.
 

Users who are viewing this thread

Back
Top Bottom