How can you force close a access form that has active validation rule

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ifclick
    New Member
    • Mar 2015
    • 7

    How can you force close a access form that has active validation rule

    Problem is when I type a lot of data in a form with validation rule and I changed my mind I want to close the form. However, it would not let me since the validation keeps on running. I can erase the data in text boxes but that will take long time just closing the form.
    • I wanted to have a close button that can override a validation rule without receiving to many error messages.
    • I can also build a clear button to delete the data text boxes and combo boxes, However i do not know how to do that in access code builder.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Undo your changes before trying to exit. Form.Undo Method (Access)
    Last edited by NeoPa; May 14 '15, 09:46 PM. Reason: Fixed broken link.

    Comment

    • ifclick
      New Member
      • Mar 2015
      • 7

      #3
      Thank you for that. What i did was mix undo command and close command in one macro so every data was erased before closing.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32636

        #4
        It's also interesting to know that the Escape key on a keyboard will, by default, undo your changes for you. It will undo the current control first if dirty and then (2nd Escape) undo the form if that's dirty. If the control isn't dirty then the first Escape will affect the current form instead, if dirty.

        Comment

        Working...