• Error number (2000)

    Author
    Topic
    #438029

    Hi,

    I would like to know what’s the error number in VB of the following error message:

    The changes you requested to the table were not successful because they would create duplicate values in the indes, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.

    Also how can I find out the error munber for error message in VB?

    Thanks

    Regards

    Viewing 1 reply thread
    Author
    Replies
    • #1043269

      Use the following structure as “template” for your code during testing

      Sub MyProc()
      ‘ Declarations
      Dim obj As Object

      On Error GoTo ErrHandler

      ‘ Main code

      ExitHandler:
      ‘ Clean up
      Set obj = Nothing
      Exit Sub

      ErrHandler:
      ‘ Report error number
      MsgBox Err.Number & ” ” & Err.Description, vbExclamation
      Resume ExitHandler
      End Sub

      This way, you’ll always see the error number.

    • #1043298

      Also check out Error codes (Access XP) from Hans

      post 312715

      HTH, John

    Viewing 1 reply thread
    Reply To: Error number (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: