Supress 2nd Validation Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #16
    I'll try to extract the relative form and table today.

    Comment

    • RuralGuy
      Recognized Expert Contributor
      • Oct 2006
      • 375

      #17
      I'll keep an eye out.

      Comment

      • ChipR
        Recognized Expert Top Contributor
        • Jul 2008
        • 1289

        #18
        The zip file is attached. I've put it back in it's non-working state by commenting out my workaround code and setting the table fields to Required = Yes, the way I had them originally. Also put a bunch of descriptive labels on the form.
        Attached Files

        Comment

        • weefrenchie
          New Member
          • Apr 2010
          • 9

          #19
          Originally posted by ChipR
          The zip file is attached. I've put it back in it's non-working state by commenting out my workaround code and setting the table fields to Required = Yes, the way I had them originally. Also put a bunch of descriptive labels on the form.
          Hey ChipR,
          I had the same problem - I checked every error function in the form (in VB design mode) and basically whenever I had a "On Error GoTo" statement, I changed the standard Err.Description to something meaningful (i.e. if the Sub was for Form_Load, I wrote "FormLoad error"

          Then you can test your db and see what error comes up.

          If you just want to get rid of the error message, you can simply suppress that part of the code by adding ' at the start of the line - don't forget to add an Exit Sub as well, example below:

          Private Sub New_Settlement_ Click()
          On Error GoTo Err_New_Settlem ent_Click

          DoCmd.GoToRecor d , , acNewRec
          Exit_New_Settle ment_Click:
          Exit Sub

          Err_New_Settlem ent_Click:
          ' MsgBox Err.Description
          ' Resume Exit_New_Settle ment_Click
          Exit Sub

          End Sub

          Bear in mind though that if you do that you won't get an error message at all for this so ideally you want another error message somewhere else that looks at possible errors.
          If you get rid of the whole On Error statement, you will get a runtime error.

          I know this post is from last year but it might help someone somewhere!

          Comment

          Working...