Check Boxes...!

Marcus H

Registered User.
Local time
Today, 16:42
Joined
Nov 29, 2000
Messages
13
Sometimes certain invoices are for trade customers who recieve a 5% discount off the total price. Is there any way of making this happen using a check box..so when it is not checked the invoice stays the same and when it is selected the 5% discount comes into play? I can manage to get this working using a list box but a check box would be so much more useful and easier. Can anyone offer any help?
 
Before getting into the coding you need to consider whether thsi discount will ever change. If so you need to make it possible for the user to change the discount rate.

the easiest way to do this would be to create a field(either per customer or for the whole system) which you can reference using code - let's assume you called the field MyDiscount and the check box where you 'turn on' the discount is called 'chkApplyDiscount'and the field where the gross price is stored is MyGrossPrice and the chargeable value is stored in MyNetPrice
Use this event procedure in AfterUpdate event

If chkApplyDiscount = True then
MyNetPrice = MyGrossPrice - (MyGrossPrice * MyDiscount)
Else
MyNetPrice = MyGrossPrice
End if

'make sure the user ticks the box after the Gross price value has been entered or you will get an error.


This way you don't have to give the user access to the gross OR net price unless you want to.

Andy
 

Users who are viewing this thread

Back
Top Bottom