Setting up function on access forms

  • Thread starter Thread starter Tammy
  • Start date Start date
T

Tammy

I am trying to complete an assignment I have no idea what I am doing and need
major help. Can anyone tell me ..... I have created a form with 3 check
boxes, each with a default value, these values are all currency or dollar
values, eg Check box 1 $600, Checkbox 2 $100 checkbox 3 $60. I am trying to
create text box(total amount due) that will add the total of these values if
the checkboxes are ticked (but no value if the text boxes are not ticked) to
the "total amount due" text box. Everything I have tried is wrong and I feel
way over my head
 
OK, well you *do* know that a check box is TRUE or FALSE??
Setting the Default Value property to $600 won't get you where you want to go.

(Good programming practice: you shouldn't use spaces in object names.
Instead of "total amount due", use "total_amount_due" or "TotalAmountDue". )


You will need to add some VBA code in the after update event of *each* of
the check boxes. You could use an IF statement to check if the control (check
box) is TRUE or FALSE. If the check box is TRUE, I would add the amount to
the text box or subtract the amount if the check box is FALSE.

Do this for each of the check boxes.

You get to do the coding...... :D I know how :P

Good luck

HTH
 
Back
Top