|
-
Nov 17th, 1999, 08:43 AM
#1
Thread Starter
New Member
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
-
Nov 17th, 1999, 11:38 AM
#2
Junior Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|