Decimal places was ignored by Access

D

Dennis Cheung

I'd tried to use a query to add data from [a].[sales] to .[sales]. Table
[a] is linked by ODBC and the source data base is SQL Server.
In [a].[sales], data were in 2 or more decimal places. After adding them to
.[sales], all data were rounded up to zero decimal places
The format in .[sales] is 2 decimal places. I'd tried to use the function
format (my number, "#.00"), it worked in a query but failed to add to table
. And Access returned "Data type mismatch in criteria expression.". I set
the criteria <>0.
 
O

Ofer

You might have null values in the field, that will cause this error.
try this

Where format(nz(FieldName,0),"#.00") <> 0

Incase of a null, the NZ function will replace it with 0, that will remove
the error.
If the values still inserted without decimal, then change the field type to
double or single as suggested in the prev post
 
Top