i have a inventory where i store products and a picture
after i add a new product and its picture and save it i can add the same product if i order the same thing
well i added 2 diffrent products with 2 diffrent pictures and when i wanted to add another product i see the same picture in the 2 diffrent products.
e.x table and chair shows me the same picture.
cant figure this out yet why its showing me the same picture
this is a combobox that i pull the photo and the name of the product.
i need when i click to each product to display its own picture.
this is the code
after i add a new product and its picture and save it i can add the same product if i order the same thing
well i added 2 diffrent products with 2 diffrent pictures and when i wanted to add another product i see the same picture in the 2 diffrent products.
e.x table and chair shows me the same picture.
cant figure this out yet why its showing me the same picture
this is a combobox that i pull the photo and the name of the product.
i need when i click to each product to display its own picture.
this is the code
Code:
Private Sub Cmb4_Click()
Set rs = CN.Execute("SELECT InvID, InvItem, InvPhoto FROM Inventory WHERE InvItem='" & Cmb4.text & "'")
While Not rs.EOF
Txt(0).text = rs!InvItem
CustPhoto = rs!InvPhoto
rs.MoveNext
Wend
Set rs = CN.Execute("SELECT InvPhoto FROM Inventory WHERE InvID= " & FrmInventory.LsVw.SelectedItem.Tag)
If Dir$(rs!InvPhoto) <> "" Then
Set BttnPhoto.Picture = LoadPicture(rs!InvPhoto)
CustPhoto = rs!InvPhoto
Else
MsgBox "the photo has been remvoved from it original place", vbExclamation
CustPhoto = ""
Set BttnPhoto.Picture = Nothing
End If
End Sub