Results 1 to 2 of 2

Thread: Loading Picture Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999


    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



  2. #2
    Junior Member
    Join Date
    Oct 1999


    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

Click Here to Expand Forum to Full Width