Results 1 to 2 of 2
  1. #1
    somewageslave is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    5

    Using Arithmetic Rounding instead of Banker's Rounding

    Hi! I have a question regarding the rounding used for Access. I have a make-table query that pulls certain client info into a new table that uses the following SQL:

    SELECT DISTINCTROW [HC Post units (change dates)].CLIENTID, [HC Post units (change dates)].CLIENT, [HC Post units (change dates)].GSEREXT, [HC Post units (change dates)].GAGENCY, Sum([HC Post units (change dates)].UNITS) AS [Sum Of UNITS] INTO [HC Post Units-Client Totals]


    FROM [HC Post units (change dates)]
    GROUP BY [HC Post units (change dates)].CLIENTID, [HC Post units (change dates)].CLIENT, [HC Post units (change dates)].GSEREXT, [HC Post units (change dates)].GAGENCY;

    The query above is then further used by the crosstab query below, AFAIK.

    TRANSFORM Sum([HC Post units (change dates)].UNITS) AS SumOfUNITS
    SELECT [HC Post units (change dates)].CLIENT, [HC Post units (change dates)].GAGENCY, Sum([HC Post units (change dates)].UNITS) AS [Total Of UNITS]
    FROM [HC Post units (change dates)]
    GROUP BY [HC Post units (change dates)].CLIENT, [HC Post units (change dates)].CLIENT, [HC Post units (change dates)].GAGENCY
    PIVOT [HC Post units (change dates)].GSEREXT;

    I would like to add an additional column (calculated field) to the original query which will round to the nearest whole number - Access uses Banker's rounding, but I need Arithmetic rounding in this case. I have tried to make a function but the syntax seems to be off (I tried the info found in this thread to make a function - https://bytes.com/topic/access/answe...ounding-up-5-a)

    Thank You!

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Rounding up
    By UT227 in forum Queries
    Replies: 5
    Last Post: 07-18-2017, 10:35 AM
  2. rounding up
    By slimjen in forum Queries
    Replies: 1
    Last Post: 02-21-2017, 04:16 PM
  3. Why Is It Rounding?
    By bgwool in forum Access
    Replies: 4
    Last Post: 12-10-2014, 06:24 PM
  4. rounding down
    By markcranmer in forum Queries
    Replies: 1
    Last Post: 10-11-2011, 09:43 AM
  5. Rounding off
    By Alex Motilal in forum Access
    Replies: 4
    Last Post: 12-20-2009, 12:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums