compare Currency to Number ??? (1 Viewer)

smig

Registered User.
Local time
Today, 15:07
Joined
Nov 25, 2009
Messages
2,209
I'm trying to compare a Currency formatted field to a Number formatted one and getting wrong results.

Any idea, other then formatting the Number as Currency too ?
Tried to use Val() but the Currency returned 0 :eek:
 

smig

Registered User.
Local time
Today, 15:07
Joined
Nov 25, 2009
Messages
2,209
I get 280 > 280 ILS as true

Maybe because the herew ILS currency symbol is on the left of the number ?
 

pr2-eugin

Super Moderator
Local time
Today, 13:07
Joined
Nov 30, 2011
Messages
8,494
No you will not. I am not sure if currency symbol follows the number or number follows the currency symbol. I would have thought the symbol should come first.. Something like this then?
Code:
? CCur(280) > CCur(CDbl("280 £"))
False
 

smig

Registered User.
Local time
Today, 15:07
Joined
Nov 25, 2009
Messages
2,209
If I format the number as currency, or vise versa, it will work.
Problem is when one Is a number and the other formated as currency.
 

Minty

AWF VIP
Local time
Today, 13:07
Joined
Jul 26, 2013
Messages
10,382
Is the number an integer or float ?
 

smig

Registered User.
Local time
Today, 15:07
Joined
Nov 25, 2009
Messages
2,209
Is the number an integer or float ?
Im realy not sure
The source is a query. Both are coming from a currency formated fields in the table.
Because the query is used for a list box one of the fields formated as currency. The other is hidden in the list box so its not formated.
 

EdFred

knows enough, dangerous
Local time
Today, 08:07
Joined
Mar 2, 2007
Messages
129
I've had issues where a number/currency displays as 284.32 actually ends up being 284.320025841 or some other trailing numbers even with limiting decimal places to 2.

Is that possible?
 

Users who are viewing this thread

Top Bottom