Image won't go away!

B

BillyMac

I have a single form with a subform that displays an image/s for
record when that record has an image related to it. The problem I hav
is that when I am looking at a record that doesn’t have an imag
related to it the last image viewed remains in the subform I hav
tried this code but keep getting a run-time error 2465, a messag
“Microsoft Access cannot find the field referred to in your expression
and in the debug window the first line of the code is highlighted.

‘Private Sub Form_Current()

‘If Not IsNull([Forms!QPaperAdminForm!LargeImageForm!ImagePath]) Then
‘ Forms!QPaperAdminForm!LargeImageForm![ImageFrame].Picture
‘Forms!QPaperAdminForm!LargeImageForm!ImagePath
‘ SysCmd acSysCmdSetStatus, "Image: '"
‘Forms!QPaperAdminForm!LargeImageForm!ImagePath & "'."
‘ Else
‘ Forms!QPaperAdminForm!LargeImageForm![ImageFrame].Picture = ""
‘ SysCmd acSysCmdClearStatus
‘ End If
‘ Exit Sub

‘End Sub

Can anyone out there help please
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top