[AccessD] CDec behaviour in SQL and VBA

Gustav Brock gustav at cactus.dk
Fri Jul 10 07:59:53 CDT 2015


Hi Jim

Thanks, but the link to the MS source seems to be broken.

Still, I cannot imagine what a second parameter of CDec could specify? 
Setting the count of decimals seems not to be the purpose as the result of the conversion always is zero.

/gustav

-----Oprindelig meddelelse-----
Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] På vegne af Jim Dettman
Sendt: 10. juli 2015 14:23
Til: 'Access Developers discussion and problem solving'
Emne: Re: [AccessD] CDec behaviour in SQL and VBA


 Found it:

http://rdsrc.us/Nmczv0

Jim. 

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman
Sent: Friday, July 10, 2015 08:00 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] CDec behaviour in SQL and VBA


 Yes and no.  When your using SQL, it runs through an expression service
while VBA does not.   The procedure calls in the expression service can be
different than what's in VBA and there have been minor differences over the years in that area (SQL vs VBA).

 I had a long drawn out thread with Bret Spalding on EE at one time. I'll see if I can't dig it out.

Jim.

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Friday, July 10, 2015 04:49 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] CDec behaviour in SQL and VBA

Hi all

Weird. I know Decimal is claimed to be buggy, but this is beyond "buggy", I
think:

http://stackoverflow.com/questions/31327402/cdec-in-access-sql-is-not-behavi
ng-the-same-as-when-used-from-access-vba

I can reproduce the described behaviour in Access 2013.

/gustav 



More information about the AccessD mailing list