getting long value

  • Thread starter Thread starter Rodolfo Fontes
  • Start date Start date
R

Rodolfo Fontes

Hi group,

I've made a function and it returns a long value.
there's a line like:
Dim Valor_EST as long
Valor_EST = (rs_NFE!Qtd_NF * rs_NFE!Valor_NF) + Valor_EST

The values are:
VALOR_EST = 0
rs_NFE!Qtd_NF = 2
rs_NFE!Valor_NF = 148.2494

After making the function, it returns
Valor_EST = 296

But it should be
Valor_EST = 296.25 (rouding)

Is there anything wrong? Why can't i get a long value?

Thanks,
Rodolfo Fontes
 
I've made a function and it returns a long value.

Long is "Long Integer". Integers by definition are whole numbers, with
no decimal places.

If you need decimal places use a Single or Double number, or a
Currency datatype (with exactly four decimal places and no roundoff
error).

John W. Vinson[MVP]
 
Back
Top