Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Sep 2002
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    It Then Coding (Acess 2003 SP2)

    I need some coding help in a form.

    I have 3 Yes/No boxes:

    If Box01 is marked YES and Box02 is kept at NO, them mark Box03 as Yes.

    If Box01 is currently YES and Box03 is currently YES, but Box02 is UPDATED to YES, then UPDATE Box03 to NO.

    If Box01 is updated to NO, then updated Box02 AND Box03 to NO

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: It Then Coding (Acess 2003 SP2)

    The following code matches your requirements as posted:
    <code>
    Private Sub Box01_AfterUpdate()
    If Me.Box01 = False Then
    Me.Box02 = False
    Me.Box03 = False
    ElseIf Me.Box02 = False Then
    Me.Box03 = True
    End If
    End Sub

    Private Sub Box02_AfterUpdate()
    If Me.Box01 = True And Me.Box02 = True Then
    Me.Box03 = False
    End If
    End Sub</code>

  3. #3
    2 Star Lounger
    Join Date
    Sep 2002
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: It Then Coding (Acess 2003 SP2)

    Thank you that was great. short and simple.

Posting Permissions

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