a problem in a sum function in vba access 2010

Posted on 2011-05-10
Last Modified: 2012-05-11
what it wrong in this method that i try to use in acces vba (to make a the round the total before tax to make that the toal with the tax (that is there 0.16 precent) will be a round number:
Private Sub RoundThePrice()
Dim d
d = sum(Forms!invoicet!invoicedetailst.Form!Total * 1.16 - Round(Forms!invoicet!invoicedetailst.Form!Total * 1.16, 0) / 1.16)

End Sub

but a get a compile error :
Sub or Function not defined
Question by:bill201
    1 Comment
    LVL 14

    Accepted Solution

    Access haven't sum function in vba module code
    Why you want to use Sum?


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    In the article entitled Working with Objects – Part 1 (, you learned the basics of working with objects, properties, methods, and events. In Work…
    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now