Im stuck (1 Viewer)

31si

Registered User.
Local time
Today, 15:21
Joined
Jan 23, 2006
Messages
20
I asked a question the other day which i got an answere extremely quickly for :) . And the anwer i have now used in my database however i have now come up against another wall. I have got the event that loads each record into the event "detail_format" but what i want to do is load a different picture into picture box for each record. The picture that is load it determined by a combo box called "rank" . I already have a section of script which i have written so i can get the forms to loads the pictures and i thought that once i have found the event that laods the info into hte report rom the query i could just copy and paste. but it won't let me.

So i am using the detail_format event
Picking the information up from a combo box called "rank"
and the pictue file directories are hard written into the script.

Can any one give me any pointers?
 

Sergeant

Someone's gotta do it
Local time
Today, 10:21
Joined
Jan 4, 2003
Messages
638
Is the pic location field available to the report? This is what you need...so you can load the appropriate pic for each record (if I understand you correctly.)
So, put the pic path field in the report's query and then on detail_format, apply the pic that matches each record.
 

31si

Registered User.
Local time
Today, 15:21
Joined
Jan 23, 2006
Messages
20
The filename of the picture is hard written into the script (I know a realy bad idea but it seemed an easy option at the time). The way i am attempting to load the picture is by using an extremely large IF command. It check the value of a combo box called "rank" and if rank equal a set value then it loads the approiate (sp?) picture. This is the way i would like to load the picture.

I don't know is this makes any sense to you, if you want any more info please email edwilson1989@gmail.com
 

Sergeant

Someone's gotta do it
Local time
Today, 10:21
Joined
Jan 4, 2003
Messages
638
Here's an easy way:
You have a pic that corresponds to each rank, right?
The text for the Rank field is on your report, right?

...rename your pics like [rankvalue].jpg to correspond to each rank.
In your detail_format event, just write:
me.image0.picture = "c:\MyFolder\" & me.RankField & ".jpg"
 

Users who are viewing this thread

Top Bottom