Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tick Box controls

Status
Not open for further replies.

Viv1

Programmer
Dec 9, 2003
42
GB
My database contains a few tick boxes that affect the value of a text box on the same form.

Direct_Debit is the name of one tick box that reduces the total by the amount shown in a text box called Direct_Debit_Discount and displays this in a text box called Total.

Has anyone any suggestions on how to make this work. The only way I can get it to work currently is to make the control source for Total: = Fees - Direct_Debit_Discount
This doesn't take into account whether the check box is ticked or not.

Thanks
 
Put an If statement on the After Update event for the tickbox. Something like;

Code:
Private Sub Direct_Debit_AfterUpdate()
If Me!Direct_Debit = True Then
    Me!Total = Me!Fees - Me!Direct_Debit_Discount
Else
    Me!Total = Me!Fees
End If
End Sub


----------------------------------------
Of all the things I have lost in my life, the thing I miss the MOST is my mind!
----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top