You can concatenate:
FieldName & "mg"
If your expr4 is a formula you have to execute the formula based on the individual items then add the string
make your formula in expr4
[lounce]*(quantity* purity) & "mg"
personally I would not put the text values in your query at all. It looks like you are trying to format it for a form or a report so I would concantenate the MG or GR or whatever other abbreviation you have on the report or form so you don't run into this problem. If you do it in your query you'd have to carry both the number and the string to be able to report it on a form/report anyway (or take an additional step to UN-parse your value)
In other words in your query let your numbers be numbers in your query.
then on your form or report you can have the formula (for a total of expr5)
= sum([expr5]) + " GR"
To take
1122000, GR
and get
1122000
you can use the Val() Function:
=Sum(Val([Expr5]))
Linq ;0)>
I agree with rpear. Don't concatenate the 'mg' in query.
Consider using report Grouping & Sorting with aggregate calcs in footers. This will allow display of detail records as well as summary calcs.
The 'mg' can be concatenated in textbox expression or be a label.
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.
the whole point linq is that he's concantentating it in a query, just to unconcantenate it in a form so he can total the number portion, then put the text string back on the end. It makes no sense. What I'm proposing is that he leaves his numbers as numbers until it's actually time to display them (on a form or on a report)
Thank you very much to all of you
To help me![]()