Exporting integer

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

In query output an expression based on integers which has integer result
comes out as real value like 1234.00. How can I ensure that the outpour
comes out as integer?

Thanks

Regards
 
Hi

In query output an expression based on integers which has integer result
comes out as real value like 1234.00. How can I ensure that the outpour
comes out as integer?

Thanks

Regards

Use the Format() function in a Query to explicitly cast the value into
a string:

ExpNum: Format([numberfield], "#")

and then export from the query.

John W. Vinson[MVP]
 
Set the Format Property of the apprpriate Column in your Query Design View.

Alternatively, (I think) you can wrap the expression with CInt() to convert
the value to Integer.

Arithmetic ops on Integers are not closed ops, e.g. division, so I think
Access / JET may treat the result as Double which has the default format of
"0.00".

HTH
Van T. Dinh
MVP (Access)
 
Back
Top