Hello Guys,
Why am I getting an error with this code? Some of the records do not have an image file path. How can I handle this?
Thank you
Why am I getting an error with this code? Some of the records do not have an image file path. How can I handle this?
Code:
Dim strImageSQL As String
Dim strImage As String
strImageSQL = "SELECT [Image] FROM QrySuppliesDetails WHERE SupplyDetailID=" & Me.lstDetails.Column(0) & ""
strImage = CurrentDb.OpenRecordset(strImageSQL).Fields(0).Value
If IsNull(strImage) Then
Me.Image38.Picture = ""
Else
Me.Image38.Picture = strImage
End If