-
Here is my code so far
Private Sub picmain_GotFocus()
If lblname = "1997 Holiday (Teddy Bear)" Then
picmain.Picture = LoadPicture("1997Holiday.jpg")
ElseIf lblname = "1998 Holiday (Teddy Bear)" Then
picmain.Picture = LoadPicture("1998HolidayTeddy.JPG")
End If
End Sub
I am having a problem though. I have a database i am accessing as well. BUt when i go to next picture the same picture stays on there and doesnt load the other pictures does anyone know how i can load them every time i can go to a new record?
If anyone can help it would be much appreciated
Thanks
Leeper
-
Instead of useing the got focus event try updating the lbl and pic when you move next (for example).
you need to have the lblname.DataSource
set to the data control and lblname.DataField set to correct field in the data base then load the pic in the lblname_Change event
also think about using select case instead of if elseif.