Results 1 to 7 of 7
  1. #1
    chavez_sea is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    105

    Rounding problem


    Hi,
    I have a payroll database that also prints the checks. However the check amount for instance 2181.80 is showing up as 2181.8
    I rounded the figure, can someone tell me what is wrong.

    Aslo I would like to know how to get a report to show up the date other than the normal options. I need the date to show as January 1, 2011 or 1st January, 2011.

    Thanks

  2. #2
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I would use the Format() function on the control(s) in the report or the query .... for both the amount and the date. (see Help)
    Last edited by ssanfu; 03-04-2011 at 05:44 PM. Reason: missing words

  3. #3
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    I'm guessing using the format function, it would be something like =Format([MyFieldName],"0,#.##") or something like that (I'm going from memory).

  4. #4
    chavez_sea is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    105
    Hi
    I tried in the query Net Pay:=Format([Net Pay],"#.##.##") and it gave me the gigures without the 00 if there was not cents. However in addition I need to put ** infron of the numbers eg **1,697.00

    Grateful for help.

  5. #5
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Untested, but try:

    = "**" & Format([Net Pay], "##,##0.00")


    Note the red above.... 100 will display as 100.00

  6. #6
    chavez_sea is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    105

    Thumbs up

    Thanks you so much. It worked perfectly.

  7. #7
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Quote Originally Posted by chavez_sea View Post
    Hi
    I tried in the query Net Pay:=Format([Net Pay],"#.##.##") and it gave me the gigures without the 00 if there was not cents. However in addition I need to put ** infron of the numbers eg **1,697.00

    Grateful for help.
    Also - you had format([Net Pay],"#(period)##(period)##") instead of format([Net Pay],"#(comma)##(period)##")

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

Similar Threads

  1. Expression rounding
    By Scorpio11 in forum Queries
    Replies: 2
    Last Post: 03-07-2011, 01:29 PM
  2. rounding digits
    By giladweil in forum Access
    Replies: 1
    Last Post: 09-01-2010, 03:11 AM
  3. Rounding problem
    By jgelpi16 in forum Queries
    Replies: 1
    Last Post: 04-06-2010, 10:27 AM
  4. Rounding off
    By Alex Motilal in forum Access
    Replies: 4
    Last Post: 12-20-2009, 12:47 PM
  5. Rounding the Average in a Query
    By jakelufkin in forum Access
    Replies: 3
    Last Post: 06-19-2009, 08:31 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