With reference to this post
I have tried the the code in your Imagesample2000 on my form to solve the problem of an image remaining from the previous record. The code I used is:
Each time I open the form to view I get a run-time error 2465 and a message "Microsoft Access can't find the field referred to in your expression" The Debug window shows the first line of code: 'If Not IsNull([ImagePath]) Then' highlighted. The ImagePath field in certainly in my sub form but for some reason Access isn't finding it. Can anyone help?
Oldsoftboss said:How to link images in your database. Uses the common dialog box to store the image path. Shows how to display, zoom as well as print.
A2000 format
I have tried the the code in your Imagesample2000 on my form to solve the problem of an image remaining from the previous record. The code I used is:
Code:
Private Sub Form_Current()
If Not IsNull([ImagePath]) Then
Forms!QPaperAdminForm!LargeImageForm![ImageFrame].Picture = [ImagePath]
SysCmd acSysCmdSetStatus, "Image: '" & [ImagePath] & "'."
Else
Forms!QPaperAdminForm!LargeImageForm![ImageFrame].Picture = ""
SysCmd acSysCmdClearStatus
End If
Exit Sub
End Sub
Each time I open the form to view I get a run-time error 2465 and a message "Microsoft Access can't find the field referred to in your expression" The Debug window shows the first line of code: 'If Not IsNull([ImagePath]) Then' highlighted. The ImagePath field in certainly in my sub form but for some reason Access isn't finding it. Can anyone help?
Last edited by a moderator: