On 2 May 2006 14:11:55 -0700, nickybon wrote:
Hi Fred,
I couldnt understand the codes you gave me. Can you tell me what I have
to do? Go to design view? what?
Nick
In Form Design view, add an Image Control to the form.
Take note of the name of this control.
Then still in form Design View, display the Form's Property sheet.
Click on the Event tab
On the line that says On Current, write
[Event Procedure]
Then click on the little button with three dots that appears on that
line.
When the code window opens, the cursor will be flashing between 2
already existing lines of code.
Write:
If Me![FieldName]= "Football" Then
Me!ImageName.Picture = "C:\PathToPicture\Football.jpg"
Elseif Me![FieldName]="Rugby" Then
Me![ImageName].Picture = "C:\PathToPicture\Rugby.jpg"
Else
Me![ImageName].Picture = "C:\PathToPicture\Cricket.jpg"
End If
Between those 2 lines.
Change [FieldName] to whatever the actual name is of the field that
contains the word 'Football', or 'Rugby', etc.
Change [ImageName] to whatever the name is of the Image control you
added earlier.
Change
"C:\PathToPicture\"
to whatever the actual path is to your picture.
Change
Football.jpg
to whatever the actual name and extension is of your picture.
When done, save this code.
Then place the same code in the [FieldName] AfterUpdate event.
Click on the [FieldName] control.
Show it's property sheet. Click on the Event tab. Write
[Event Procedure]
on the AfterUpdate line. Click on the button with 3 dots and follow
the same instructions as you did for the Current event.
Save these changes as well.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail