Connecting Tech Pros Worldwide Forums | Help | Site Map

Help with Erro handling

Newbie
 
Join Date: Jul 2006
Location: Houston, Texas
Posts: 11
#1: Aug 24 '06
Here is the code I have so far. When a user delete's a record or tries to exit without completing an update this error occurs. I was thinking of using a "RESUMENEXT" handler. Please help with some input

Big K Hutch

+_+_+_+_+_+_ Current DAOdb Error Handler _+_+_+_+((_

Private Sub cmdAdd_Click()
On Error GoTo AddErr

datPrimaryRS.Recordset.AddNew
If Trim(txtDAO_Name.Text) = "" Then txtDAO_Name.Text =

UserName
Exit Sub
AddErr:
MsgBox Err.Description
End Sub

Private Sub cmdDelete_Click()
On Error GoTo DeleteErr
With datPrimaryRS.Recordset
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub

Reply


Similar Visual Basic 4 / 5 / 6 bytes