Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2002
    Location
    Columbus, GA
    Posts
    81

    Red face Unanswered: Product Pictures on Forms

    I currently have an inventory database that allows us to store information about each product. When you go to each record on the form, i have a command that shows the picture of the product. Could anyone tell me what to add to make this show a generic picture when a real picture is not available.

    Generic picture would be q:\imgs\nopic.jpg

    CURRENT CODE

    Private Sub Form_Current()
    Me.imgProd.Picture = "Q:\imgs\" & Me.[Item Number] & ".jpg"
    End Sub


  2. #2
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Smile it depend how do

    it depends how do you get the active pict
    i think by RS

    Private Sub Form_Current()

    if isnull(me.RS[Item Number]) then
    Me.imgProd.Picture = "q:\imgs\nopic.jpg"
    else
    Me.imgProd.Picture = "Q:\imgs\" & Me.[Item Number] & ".jpg"
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •