Check box problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zulema
    New Member
    • May 2007
    • 44

    Check box problems

    Please help! I have 2 check boxes named "18" and "36" that need to be seen only when a date is entered in textbox named "effective date". When the user checks one of the two boxes it must stay visible, the box that is not checked must become invisible. I have tried something but am very far from making it work. I am very new to this so please have compassion! This is what i have so far:

    Private Sub Effdate Change()
    If Me.Effdate.valu e = "date" then
    Me.Check18.Visi ble = False
    Else
    Me.Check18.Visi ble = True
    End If
    End Sub
  • damonreid
    Recognized Expert New Member
    • Jul 2007
    • 114

    #2
    Please help! I have 2 check boxes named "18" and "36" that need to be seen only when a date is entered in textbox named "effective date". When the user checks one of the two boxes it must stay visible, the box that is not checked must become invisible. I have tried something but am very far from making it work. I am very new to this so please have compassion! This is what i have so far:
    The first thing you need is

    [code=vb]Private Sub effective_date_ change()
    if effective_date = null then
    me.checkbox18.v isible = false
    me.checkbox36.v isible = false
    else
    me.checkbox18.v isible = true
    me.checkbox36.v isible = true
    end if
    end sub[/code]

    Then do the following for each checkbox
    [code=vb]Private Sub Checkbox_AfterU pdate()
    if Checkbox = false then
    me.othercheckbo x.visible = true
    else
    me.othercheckbo x.visible = false
    end if
    end sub[/code]

    Comment

    • Zulema
      New Member
      • May 2007
      • 44

      #3
      Originally posted by damonreid
      The first thing you need is

      [code=vb]Private Sub effective_date_ change()
      if effective_date = null then
      me.checkbox18.v isible = false
      me.checkbox36.v isible = false
      else
      me.checkbox18.v isible = true
      me.checkbox36.v isible = true
      end if
      end sub[/code]

      Then do the following for each checkbox
      [code=vb]Private Sub Checkbox_AfterU pdate()
      if Checkbox = false then
      me.othercheckbo x.visible = true
      else
      me.othercheckbo x.visible = false
      end if
      end sub[/code]
      Thanks, it worked! Now...How can i get the check box that was picked to stay visible? I really appreciate your help!

      Comment

      • Zulema
        New Member
        • May 2007
        • 44

        #4
        [QUOTE=Zulema]Thanks, it worked! Now... how can i keep the user from picking both?

        Comment

        Working...