Consulting

Results 1 to 4 of 4

Thread: Automating discount prices with total prices using VBA

  1. #1
    VBAX Mentor
    Joined
    Aug 2010
    Posts
    457
    Location

    Automating discount prices with total prices using VBA

    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.


    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.

  2. #2
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    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])

    We are what we repeatedly do. Excellence, therefore, is not an act but a habit.
    Aristotle

  3. #3
    VBAX Mentor
    Joined
    Aug 2010
    Posts
    457
    Location
    Thank you!

  4. #4
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Don't forget to mark this thread as Solved (Thread Tools)

    We are what we repeatedly do. Excellence, therefore, is not an act but a habit.
    Aristotle

Posting Permissions

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