Access 2000 Crashes on double click ??

  • Thread starter Thread starter Don Garry
  • Start date Start date
D

Don Garry

Hello, I'm hoping someone can assist me with a problem I have.

I have a form that imports a picture into it....here's the code.
strStockNum = Me.StockNum & ".jpg"
If IsNull(DLookup("[PathToPic]", "VehiclePic")) Then
Me.imgVehiclePic.Picture = ""
Else
Me.imgVehiclePic.Picture = DLookup("[PathToPic]", "VehiclePic")
& strStockNum
End If

When I use the record selector at the bottom of the form to move between
records the forms current event uses the above code and everything works
fine and the new picture is imported.

However, if I indavertently double click on the move to the next record
button Access completely crashes.

I had the same problem when trying to access the above form from another
form when I inadvertently double clicked the command button which opened the
above form. I was able to correct that problem by using the
DoCmd.CancelEvent in the double click event of the command button.

Does anyone have any suggestions on what I might do here ?
 
I see others haven't responded to this one, so I wanted to assure you that
you're not completely crazy - I've experienced similar things when paging
rapidly through a form which displays an image OnCurrent.

The obvious option is - don't do that. It doesn't take too many bad
experiences to develop the habit.

The other option I've sometimes used is to give the user a button to display
the picture, so that it doesn't load until it's requested. (You might want
to just make it invisible OnCurrent.) Perhaps not great, either, but that's
all I have to offer.
 
I had the same problem when trying to access the above form from another
form when I inadvertently double clicked the command button which opened
the above form. I was able to correct that problem by using the
DoCmd.CancelEvent in the double click event of the command button.


Don,
If the CancelEvent method worked on a command button, then you might
consider making the normal navigation buttons invisible and creating your
own and use the CancelEvent in the double click event of those buttons.
 
Back
Top