434,998 Members | 2,773 Online
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

# Concatenate Numbers And a String with A defined Number of Decimal places

 P: 14 Hi, I have a Table which has 2 Double, Fixed Number fields to 3 decimal places. This fields are populated as the result of 2 division operations which lead to multiple decimals (the numbers show with 3 decimals in the tables, forms, etc). I need to combine both of those fields on a form (text boxes)in another text box with a series of different operands, like /, *, ± etc. [combined]=[Number1]&"±"&[Number2] but I cannot get it to work without showing all the resulting decimals 0.6333333333±0.0555563565 . And what I need something like 0.633±0.055. Thanks, Oct 8 '07 #1
6 Replies

 Expert 2.5K+ P: 2,653 Hi, there. Use Format function to reduce number of decimals prior to concatenation. Placeholders for digits in format string are "0" or "#", depends on whether you want to fill empty positions with zeroes or not. Oct 8 '07 #2

 P: 14 Hi, From what I understand what you mean is to give a format to that specific textbox and field in the table? The only thing is that sometimes I just need to save 3 decimal number so if the format is fixed to something then II wont get that number displayed Properly, Thanks, Hi, there. Use Format function to reduce number of decimals prior to concatenation. Placeholders for digits in format string are "0" or "#", depends on whether you want to fill empty positions with zeroes or not. Oct 9 '07 #3

 P: 14 Hi Again, Actually the formatting in the table and textbox would work bu tI can't seem to get it to work any advice? Hi, I have a Table which has 2 Double, Fixed Number fields to 3 decimal places. This fields are populated as the result of 2 division operations which lead to multiple decimals (the numbers show with 3 decimals in the tables, forms, etc). I need to combine both of those fields on a form (text boxes)in another text box with a series of different operands, like /, *, ± etc. [combined]=[Number1]&"±"&[Number2] but I cannot get it to work without showing all the resulting decimals 0.6333333333±0.0555563565 . And what I need something like 0.633±0.055. Thanks, Oct 9 '07 #4

 Expert 2.5K+ P: 2,653 Hi, there. Actually I didn't mention setting textbox format. I doubt it ever help. As far as I've got it you have textbox with the following expression as controlsource: =[Number1]&"±"&[Number2] So change the expression to =Format([Number1], ".###") & "±" & Format([Number2], ".###") or =Format([Number1], ".000") & "±" & Format([Number2], ".000") as you like. Kind regards, Fish Oct 9 '07 #5

 P: 14 Thanks for your help it works preety good Hi, there. Actually I didn't mention setting textbox format. I doubt it ever help. As far as I've got it you have textbox with the following expression as controlsource: =[Number1]&"±"&[Number2] So change the expression to =Format([Number1], ".###") & "±" & Format([Number2], ".###") or =Format([Number1], ".000") & "±" & Format([Number2], ".000") as you like. Kind regards, Fish Oct 11 '07 #6

 Expert 2.5K+ P: 2,653 You are welcome, Best regards, Fish Oct 11 '07 #7