[AccessD] Bug in access

jwcolby jwcolby at colbyconsulting.com
Tue Nov 10 11:30:04 CST 2009


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



More information about the AccessD mailing list