Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Posts
    173

    Unanswered: bypass "before update" setting

    Is there a way to bypass the "before update" setting of a form for certain conditions? I have a form that asks the user if they really want to save the form or not when they close it and the info has changed. I'd like to bypass this for a certain condition.

  2. #2
    Join Date
    Jan 2003
    Location
    Dordrecht, The Netherlands
    Posts
    95

    Re: bypass "before update" setting

    Originally posted by leeroy
    Is there a way to bypass the "before update" setting of a form for certain conditions? I have a form that asks the user if they really want to save the form or not when they close it and the info has changed. I'd like to bypass this for a certain condition.
    If you do:

    Cancel = True

    Somewhere in the Before_Update sub the update action will be cancelled, for instance:

    Sub Form_BeforeUpdate(Cancel As Integer)

    Cancel = (MsgBox("Do you want to save?",vbYesNo) = vbNo)

    End Sub

Posting Permissions

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