[AccessD] Bug in access

jwcolby jwcolby at colbyconsulting.com
Tue Nov 10 14:43:09 CST 2009


Lambert,

cdbl() is a different function.  Did you try cDec()?

John W. Colby
www.ColbyConsulting.com


Heenan, Lambert wrote:
> There has to be more to this than meets the eye.
> 
> The following SQL runs just fine for me, I Access 2003.
> 
> SELECT CDbl("123.45") AS SomeDouble, BankNames_tbl.BankID
> FROM BankNames_tbl;
> 
> Decompile your front end?
> 
> Lambert
>  
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
> Sent: Tuesday, November 10, 2009 12:30 PM
> To: Access Developers discussion and problem solving
> Subject: [AccessD] Bug in access
> 
> I am working on a project where I use a table to dynamically build a query.  The table has field names in it, and I can just append those field names into a select string and voila, it works. 
> place the field names you want in the table and a select statement is created of those fields.  This system is shuffling fields around from scanned documents (CSV files) to get them into a standard order.
> 
> OK, so I can also use entire functions such as format(Field1,"000.00") and that works.  cSng(Field1) works.  cDbl(Field1) does NOT WORK.  It complains that the function cDbl needs two parameters, but if I supply anything in the second parameter, then cDbl works (no longer complains) but returns a zero.
> 
> To test this bug, create an aliased field in a query something like
> 
> Select cDbl("123.45") as SomeField, etc etc
> 
> The QBE will immediately complain about cDbl needing another parameter.  Try the same thing with
> cSgl("123.45") and it works just fine.  NOTICE that cDbl() in the debug window does NOT require another parameter and if you try to provide one, it will fail to execute.
> 
> The bugs we have to work around.  Sigh.
> 
> But hey, we have a shiny new tool bar.  ;)
> 
> --
> John W. Colby
> www.ColbyConsulting.com
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 



More information about the AccessD mailing list