Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Feb 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Confirmation warning. (Access 97)

    Greetings

    This is probably an easy questions for you experts... here goes. I

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Confirmation warning. (Access 97)

    Use this code in the before update of the checkbox.<pre>Private Sub Check0_BeforeUpdate(Cancel As Integer)
    If Me.Check0 = True Then
    If MsgBox("Do you want to check the check box ?", vbYesNo) = vbNo Then
    Cancel = True
    End If
    Else
    If MsgBox("Do you want to uncheck the check box ?", vbYesNo) = vbNo Then
    Cancel = True
    End If
    End If
    End Sub
    </pre>

    Replace all the Check0 with the name of your checkbox.
    Francois

  3. #3
    New Lounger
    Join Date
    Feb 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Confirmation warning. (Access 97)

    WoW

    I have no idea what i just typed but it works!!!

    Thanks!!! You

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Confirmation warning. (Access 97)

    A little explication:
    When you click on an empty check box the value is set to true.
    Before update I ask if you really want to set it to true.
    If you enter No I set cancel to true to cancel the true setting.
    The second part is for the case the check box is already checked and do the same but for unchecking.
    Hope this make the things more understandable
    Francois

  5. #5
    New Lounger
    Join Date
    Feb 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Confirmation warning. (Access 97)

    Yes, that make it more clear to me...

    Thanks again, let

Posting Permissions

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