crashes when scrolling

G

Guest

I'm using the following code to display images on a form. It works fine.
However, If you scroll to fast through the records, access crashes. How can
I prevent this from happening?

Thanks.


Function setImagePath()
Dim strImagePath As String
On Error GoTo PictureNotAvailable
strImagePath = Me.txtImageName
Me.ImageFrame.Picture = strImagePath
Exit Function
PictureNotAvailable:
strImagePath = "\\server\newparts\npimages\np.jpg"
Me.ImageFrame.Picture = strImagePath
End Function
 

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