Home  |   French  |   About  |   Search  | mvps.org  

What's New
Table Of Contents
Credits
Netiquette
10 Commandments 
Bugs
Tables
Queries
Forms
Reports
Modules
APIs
Strings
Date/Time
General
Downloads
Resources
Search
Feedback
mvps.org

In Memoriam

Terms of Use


VB Petition

Queries: Handling floating-point, Currency, and Decimal Datatype in SQL

Author(s)
Joe Foster

Jet can be picky about decimal points. This can cause problems in countries where "," is the decimal "point". Since Type specification characters such as @ don't work in Access SQL, Jet will convert anything with a decimal point into a Double, possibly with a loss of precision or even a type conversion failure.

This means that we have to use CCur or CDec within the SQL when dealing with those types, but these functions always obey regional settings and won't always work with Str$. To get around it, use the Format function.

"where salary = ccur(""" & Format$(MyCurrencyValue) & """)"


© 1998-2010, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer