Results 1 to 7 of 7
  1. #1
    Lockrin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    52

    Rounded number inside of text

    Hello all. I have a query with a calculation that gives me around 10 digits after the decimal point. Then on a report I want to use that number but only rounded to 3 digits after the decimal point. I could change the format but there is also a twist. I want to put that number inside of text.



    Basically I want a control box that has a control source of
    ="(TRIM GIRTH= " & [Trim Girth] & ")"

    Is there a way for me to make it round it to the nearest three while still in the query?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You can RightClick on a column in design mode of a query and go to properties. If the field is numeric it will let you set the Format of the column.

  3. #3
    Lockrin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    52
    That doesn't quite work... It does fix the problem in the Query itself, however when it is inserted into a text box along with text it loses its formatting. Any other ideas?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about:
    ="(TRIM GIRTH= " & Round([Trim Girth],3) & ")"

  5. #5
    Lockrin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    52
    That worked perfectly! Thanks a lot

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad we could help.

  7. #7
    Lockrin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    52
    Yes, every time I have had an issue, you guys have been there. Thanks for all you do.

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

Similar Threads

  1. How to vertically align text inside a text box ?
    By alexcalgary in forum Forms
    Replies: 2
    Last Post: 10-06-2010, 08:44 AM
  2. Concatenation of Text and Number
    By diane802 in forum Reports
    Replies: 67
    Last Post: 01-26-2010, 03:37 PM
  3. Field switching from Number format to Text
    By COforlife in forum Queries
    Replies: 1
    Last Post: 11-10-2009, 03:23 PM
  4. exporting text produces a number
    By greend in forum Import/Export Data
    Replies: 0
    Last Post: 07-12-2006, 03:55 PM
  5. Concatenate two fields (text & number) for key field
    By Larry Elfenbein in forum Forms
    Replies: 2
    Last Post: 11-10-2005, 07:45 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