Rick,
I answered this for someone else asking the same question so I
apologize for the multiple post, but here's an easy solution:
What you're looking to do is very simple. I have done it in a number
of database builds, provided the images you wish to display are
relatively small and the total number of records you wish to display
is relatively small.
To give you an idea on the limits, I have built numerous forms that
do
this that display images that are 32 x 32 pixels where the total
number of records returned is in the hundreds (not thousands.)
Here's how you can do this very easily:
You'll do this with two tables. One is your existing table that
stores
data:
tblExistingData
DataID int (PK)
AnimalInfo varchar(50)
AnimalID int
This one will have data in it that looks like this:
1 This is my cow 4
2 This is my neighbor's dog 7
3 I rode this horse 5
4 I know this sheep 3
5 Some smelly pig 6
You need to create a new table that stores the images:
tblAnimalImages
AnimalID int (PK)
AnimalName varchar(10)
AnimalImage image
Into this table you copy and paste your icons into the appropriate
image column. The data will look like this:
1 Giraffe <giraffe icon>
2 Elephant <elephant icon>
3 Sheep <sheep icon>
4 Cow <cow icon>
5 Horse <horse icon>
6 Pig <pig icon>
7 Dog <dog icon>
8 Goat <goat icon>
9 Cat <cat icon>
Create your continuous form displaying the fields you want to show
and
include a bound image frame bound to AnimalImage
Create a query that links your two tables:
SELECT
d.DataID,
d.AnimalInfo,
i.AnimalImage
FROM
tblExistingData d
LEFT OUTER JOIN
tblAnimalImages i
ON d.AnimalID = i.AnimalID
On Dec 8, 7:00 pm, Ian <ian.sex...@ntlworld.comwrote:
I have a form with a sub form, on the continues sub for I want to
display some data along with a picture, on the On Current event I have
the code:
[ImageFrame].Picture = Nz([ImagePath])
[ImageFrame] is the name of the picture control, [ImagePath] is the name
of the text field that holds the path to the jpg.
What I want is each record in the sub form to show the associated
picture, what I get is all records showing the first picture. I assume
this is because the On Current event only fires once and not once for
each record.
Any suggestions would be appreciated.