Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2002

    Unanswered: Updating field in BeforeUpdate

    Hi all,

    In Access, I am trying to trim the spaces off of a field before it updates (or validates). The following code is returning error "2115: The macro or function set to the BeforeUpdate or ValidationRule property for this field is preventing EditPro from saving the data in the field."

    Private Sub txtIllustrations_BeforeUpdate(Cancel As Integer)
    '// Trim spaces
        Me!txtIllustrations = Trim(Me!txtIllustrations)
    End Sub
    What should I do about this?
    Matt Alexander

    Don't click here.

    Odigo: 5408962
    AIM: mattalexx
    ICQ: 138006220

  2. #2
    Join Date
    Nov 2001
    Hi Matt,

    Move your code in AfterUpdate event.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts