|
-
May 16th, 2013, 02:31 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Access XP Query - Preserve number format in calculated field
In the image I've circled the formatting I'd like to retain in the calculated field. Can this be done?
-
May 30th, 2013, 07:05 AM
#2
Thread Starter
Hyperactive Member
Re: Access XP Query - Preserve number format in calculated field
Either my question is poorly written or this forum area doesn't get much attention.
-
May 30th, 2013, 03:55 PM
#3
Hyperactive Member
Re: Access XP Query - Preserve number format in calculated field
I would guess poorly written.... I'm not really sure what exactly you are asking. What calculated field are you referring too and what is the calculation you are using?
-
May 30th, 2013, 05:27 PM
#4
Thread Starter
Hyperactive Member
Re: Access XP Query - Preserve number format in calculated field
I'm not even sure if 'calculated field' is an appropriate term. In the image, the field named 'Station' is a combination of fields 'CS_NUM', 'CS_MP', 'PLUS_MINUS and 'LOC_CD'. The issue is that values from field 'CS_MP', such as '0.000', end up as '0' in the combined field. I'd prefer they retain the '0.000' format. Also note that field 'CS_MP' is number formatted properly in the database to display 3 decimal places. I believe the problem is related to converting it to a string and technically '0.000' is ZERO.
-
May 31st, 2013, 03:34 AM
#5
Re: Access XP Query - Preserve number format in calculated field
Unfortunately your picture doesn't show for me so I'm not sure if this answer is apropriate but it sounds to me like you're looking for the Format command in Access.
Your calculated field will have an underlying formula. You simply need to wrap the bit of the formula that's converting CS_MP to a string in a format with the apropriate format mask.
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
-
Jun 17th, 2013, 05:25 PM
#6
Thread Starter
Hyperactive Member
Re: Access XP Query - Preserve number format in calculated field
Wish I would've noticed this two weeks ago. Oh well, your suggestions was right on target and solved my problem.
Referencing the image above, if anyone can see it, I changed the calculation of the field to:
Station: [CS_NUM] & " " & Format([CS_MP],"#0.000") & [PLUS_MINUS] & [LOC_CD]
And produced, i.e., "54011 0.000+R" instead of "54011 0+R".
Thank you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|