rghaddad@inco.com.lb
Registered User.
- Local time
- Today, 11:29
- Joined
- Dec 5, 2013
- Messages
- 16
Hello All,
Below is a Macro I wrote assigning a picture to an image box on a form.
it worked properly then stopped for no reason.
it is now generating runtime-error 2220
============================================
Private Sub Combo45_Change()
'This is the By Part Reference ComboBox
Dim SelectedPartName As Variant
If Not IsNull(DLookup("[PartPicture]", "Table_Stock", _
"[PartName]=[Forms]![Form_By_Products]![combo45]")) Then
SelectedPartName = DLookup("[PartPicture]", "Table_Stock", "[PartName]=[Forms]![Form_By_Products]![combo45]")
MsgBox ("Selected Part: " & SelectedPartName)
' On Error Resume Next
Image22.Picture = SelectedPartName
Else
MsgBox "No Image"
Image22.Picture = ""
End If
End Sub
Below is a Macro I wrote assigning a picture to an image box on a form.
it worked properly then stopped for no reason.
it is now generating runtime-error 2220
============================================
Private Sub Combo45_Change()
'This is the By Part Reference ComboBox
Dim SelectedPartName As Variant
If Not IsNull(DLookup("[PartPicture]", "Table_Stock", _
"[PartName]=[Forms]![Form_By_Products]![combo45]")) Then
SelectedPartName = DLookup("[PartPicture]", "Table_Stock", "[PartName]=[Forms]![Form_By_Products]![combo45]")
MsgBox ("Selected Part: " & SelectedPartName)
' On Error Resume Next
Image22.Picture = SelectedPartName
Else
MsgBox "No Image"
Image22.Picture = ""
End If
End Sub