Results 1 to 3 of 3
  1. #1
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839

    Numerical Formatting

    How do you get a number to show 11.10. Normal formatting will put it at 11.1 I kbow I can format(field,"00.00) and get it, but I do not want to have the beginning set 11 to be represented by 11.00. I am using a concantenated field for this. CRNumbers: [CR_NO] + ([Sub_No]*.01). This gets me Vers A. I tried Format([CR_NO]) + ([Sub_No]*.01), "Fixed") and Format([CR_NO]) + ([Sub_No]*.01), "0.00"). This gets me Vers B. I am trying to get Vers C.


    I can get this: Vers A
    11
    11.01
    11.02....


    11.09
    11.1

    or this: Vers B
    11.00
    11.01
    11.02....
    11.09
    11.10

    I would like to have this
    11
    11.01
    11.02....
    11.09
    11.10

    Thanks

  2. #2
    drexasaurus's Avatar
    drexasaurus is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    Santa Ana, CA
    Posts
    60
    I don't think there is a clean answer. My first few ideas:
    Replace(CStr(Format([Number], "0.00")), ".00", "") --> That would be turning into a string and replacing all the unwanted .00s. You may not need to explicitly use CStr().
    Also, you could create a helper function yourself if you didn't want to do something like up there if it's very frequently used, but in vba that really slows things down when custom functions are used in queries.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    These are not actually numeric data but really identifiers, like for chapter/verse? Only the two levels? These are text type fields?

    So if Sub_No is null, no decimal part?

    Probably several ways to accomplish. The Replace() calc suggested by drex is one. The CStr() is not needed because Format results in a string.
    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. DLookup and Numerical Values
    By The Professor in forum Programming
    Replies: 5
    Last Post: 02-07-2013, 11:54 AM
  2. Query Numerical and Text
    By Athyne in forum Queries
    Replies: 1
    Last Post: 01-14-2012, 12:07 AM
  3. Numerical Issues
    By kwooten in forum Queries
    Replies: 3
    Last Post: 01-10-2012, 01:15 PM
  4. Clueless- numerical order
    By Andy_Aus in forum Access
    Replies: 1
    Last Post: 11-28-2011, 08:49 AM
  5. Numerical Value based on Date
    By jbarrum in forum Access
    Replies: 4
    Last Post: 03-11-2010, 01:04 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