P
Paul
I have a simple calculated field in a query based on the following
expression:
$/sf: IIf([SqFt]<>0,Format([Rent]/[SqFt],"Currency"),"")
In the query, Rent is set to Currency format, and SqFt is set to Standard
format. The calculated field, $/sf, won't let me choose the format in the
properties drop menu, so I'm using the Format( . . . "Currency") to tell the
query this vaule should be treated as a number.
I'm using this query in a subform datasheet, and if I try to sort by the
$/sf column, it sorts the values as if they were text as shown in the list
below:
1.45
1.56
16.21
2.05
which is what you would want if these were text values, but not currency.
If I try to sort this column directly from the query, by putting "Ascending"
in the Sort box, I get an error message saying
ORDER BY clause (IIf([SqFt]<>0,Format([Rent]/[SqFt],"Currency"),"")
confilcts with DISTINCT.
What can I do to overcome this problem?
Thanks in advance,
Paul
expression:
$/sf: IIf([SqFt]<>0,Format([Rent]/[SqFt],"Currency"),"")
In the query, Rent is set to Currency format, and SqFt is set to Standard
format. The calculated field, $/sf, won't let me choose the format in the
properties drop menu, so I'm using the Format( . . . "Currency") to tell the
query this vaule should be treated as a number.
I'm using this query in a subform datasheet, and if I try to sort by the
$/sf column, it sorts the values as if they were text as shown in the list
below:
1.45
1.56
16.21
2.05
which is what you would want if these were text values, but not currency.
If I try to sort this column directly from the query, by putting "Ascending"
in the Sort box, I get an error message saying
ORDER BY clause (IIf([SqFt]<>0,Format([Rent]/[SqFt],"Currency"),"")
confilcts with DISTINCT.
What can I do to overcome this problem?
Thanks in advance,
Paul