Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

High Speed Error Trapping Question

Status
Not open for further replies.

VoodooRage

Programmer
Oct 9, 2002
43
US
I have a form that is used for data entry. I am doing an error trap for the FORM "OnERROR" event. The error being trapped is when the user enters a duplicate record.

Private Sub Form_Error(DataErr As Integer, Response
As Integer)

' In the event the user tries to add a duplicate
' record (Code = 3022).

If DataErr = 3022 Then
Response = acDataErrContinue
' Inform the user.
MsgBox("Error Message")
End If
' End the procedure.
End
End If

End Sub

The application is set up to compact on exit and is published as an mde file.

The problem I am experiencing is that the user will go to enter in a production record for the day and the error message will display and the record is not accepted. When I pull the tables into my "development" database there are no production records in the table for the date therefore the user should not get this message. I don't understand why this would start suddenly. There are about 8100 records in the table and the database is well designed and programmed. This has been done every day for the last 4 months and has only recently started erroneously trapping the error?

As always your help is greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top