PDA

View Full Version : Automating discount prices with total prices using VBA



wedd
09-07-2010, 08:09 AM
I am designing a form using ms access 2007 were a field with the cost and another field with various discounts based on several different products, can be added together, to then display the total amount the customer needs to pay in a blank field. Have you any sample code of how I can create this? Would I need to create a query in Access for this to work properly? Thanks for your help. :friends:


In addition, I would also like to create a yes/no vba code to ask the user whether the customer has paid to use an item. If she or he has then the transaction is accepted, if he or she hasn't then the transaction will be rejected. Thanks again for your assistance. :friends:

geekgirlau
09-08-2010, 04:21 PM
Actually you don't need code. You can enter a formula as the control source for an unbound text box, subh as =Sum([CostField])-Sum([Discount])

wedd
09-08-2010, 05:27 PM
Thank you!

geekgirlau
09-08-2010, 10:13 PM
Don't forget to mark this thread as Solved (Thread Tools)