Results 1 to 2 of 2
  1. #1
    yagerlegi is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Oct 2014
    Posts
    29

    SQL Number format


    Hello,

    I am currently using sql syntax to get the data from a table on a form. I have a list where it sums up all the sales for that particular customer but I need help formatting the number. Here is my statement

    SELECT (SUM([tblsales.sale])) from tblsales WHERE tblsales.id=forms!frm_Sales.Customer;

    How do I add a format to this syntax? I would like to format the number with commas and no decimal.

    Thank you,

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Try the FormatNumber() function.

    FormatNumber(Sum([sale]),2) AS SumSales

    Otherwise, build a report and set Format and DecimalPlaces properties of textbox.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Standard number format?
    By asmores in forum Forms
    Replies: 2
    Last Post: 03-22-2013, 08:31 AM
  2. Number format issue
    By stafjoy in forum Queries
    Replies: 5
    Last Post: 07-19-2012, 08:38 AM
  3. Number Format to General Format
    By mkc80 in forum Access
    Replies: 2
    Last Post: 05-05-2012, 02:10 AM
  4. Number Field Format.
    By cap.zadi in forum Reports
    Replies: 2
    Last Post: 12-04-2011, 10:17 PM
  5. Phone number format
    By ManvinderKaur in forum Access
    Replies: 1
    Last Post: 06-24-2010, 08:07 AM

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