FastLearnerIThink
Technical User
I have developed a DVD collection database with pictures. Whenever an error occurs, the error handler does not fire up. Can someone please look at my code and tell me why this may be so?
The most common error is when the image is moved and the image path is no longer correct. I tried to capture it, error 2220, and tell it what to do, but program still stops and highlights the me.imgCover = me.txtimagepath line. Even after chnging it to the code above, it still won't fire up.
Any help will be appreciated. Thanks.
-- Fast Learner, I Think
Here's something to think about. How come you never see a headline like 'Psychic Wins Lottery!'? - Jay Leno
Code:
Private Sub Form_Current()
On Error GoTo Handle_Error
If Not IsNull(Me.txtRegionCode) Then
Me.txtRegionDesc = DLookup("[fldRegionDesc]", "[tblRegion]", "RegionCodeID = " & Me.txtRegionCode)
End If
If Not IsNull(Me.txtImagePath) Then
Me.imgCover.Picture = Me.txtImagePath
Else
Me.imgCover.Picture = ""
End If
Handle_Error:
MsgBox "Executing Error Halt, Error: " & Err.Number & vbCrLf & _
"Description: " & Err.Description
End Sub
The most common error is when the image is moved and the image path is no longer correct. I tried to capture it, error 2220, and tell it what to do, but program still stops and highlights the me.imgCover = me.txtimagepath line. Even after chnging it to the code above, it still won't fire up.
Any help will be appreciated. Thanks.
-- Fast Learner, I Think
Here's something to think about. How come you never see a headline like 'Psychic Wins Lottery!'? - Jay Leno