[AccessD] Bug in access

jwcolby jwcolby at colbyconsulting.com
Tue Nov 10 14:59:50 CST 2009


Yep, it is cDec() not cDbl().

And I just retested cDec("123.45") and it is in fact failing in a query.  It gives the message:

"The expression you entered as a function has the wrong number of arguments".  The truly odd part is 
that if you simply do something like cDec("123.45",1) it stops complaining but it returns a zero. 
Furthermore if in the debug window you do:

?cDec("123.45",1)

it throws an error:

Compile error:

Wrong number of arguments or invalid property assignment.

If you use ?format(cdec("123"), "000.00") in the debug window, this works, but in a query it gives 
the same error as mentioned above.

I'm calling this one a bug folks.

And no, I haven't reported it.  I just ran into it today.

John W. Colby
www.ColbyConsulting.com


Steve Schapel wrote:
> Charlotte,
> 
> Well, John did say:
> "To test this bug, create an aliased field in a query something like
> Select cDbl("123.45") as SomeField, etc etc"
> 
> But anyway, it's working correctly for me using a field name too.  And also 
> in combination with another function such as:
> CDbl(Right(TextFieldEndingWithDigits],2))
> 
> Regards
> Steve
> 
> 
> --------------------------------------------------
> From: "Charlotte Foust" <cfoust at infostatsystems.com>
> Sent: Wednesday, November 11, 2009 8:06 AM
> To: "Access Developers discussion and problem solving" 
> <accessd at databaseadvisors.com>
> Subject: Re: [AccessD] Bug in access
> 
>> Did I miss something or did you guys?  I understood that John was 
>> specifically trying to use CDbl against a field name, not an explicit 
>> string.  Is that correct, JC?
>>
>  
> 



More information about the AccessD mailing list