Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004

    Unanswered: storing values from subform checkboxes in parent form textboxes


    I have some checkboxes in a sub form, and i want them to deduct a value of 18 from a textbox in the parent form (which has a default value of 90)
    i want all checkboxs to take a further 18 from the parent form textbox value but put it back if the checkbox is unticked again.

    what im trying to do in the subform is say "did agent swear" yes/no
    if yes then parentform textbox value = textbox value -18
    i also want these in percentages as there are 5 checkboxes all with 18% as a value so if all 5 are no then the textbox would be 90% if all are yes then textbox would be 0% if 4 are yes 1 no then text box would be 72%

    anyone know of a good way of doing this?

    thank you

  2. #2
    Join Date
    Dec 2002
    Préverenges, Switzerland
    see if this works for you:

    mother form is frmMother
    subform is frmChild
    checkbox on frmChild is myChk
    textbox holding default 90 on frmMother is my90

    in frmMother:

    Public Sub messWithMy90(AddMe as integer)
    my90 = my90 + AddMe
    end sub

    in frmChild:

    Private Sub myChk_AfterUpdate()
    if myChk then
    messwithmy90 -18
    messwithmy90 18
    end sub

    currently using SS 2008R2

Posting Permissions

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