How I do use kind of "Round" in Queries?

C

Cecy

I'm using the next query to filled up a Grid on VisualBasic. I do need to
round "CurrMonto" to 2 decimals actually is showing 4.

SELECT IdGastos as IdNum, strRegistro as Registro, strGasto as [Detalle del
Gasto], CurrMonto as Monto, Cstr(Cstr(month(DateGasto)) + '/' +
Cstr(day(dateGasto)) + '/' + Cstr(year(dateGasto))) as [Fecha Gasto],
BooFactura as [Con Factura]
FROM tblGastos
where DateGasto " + "between #" + CStr(Format(DTPickerInicio.Value,
"mm/dd/YYYY")) + "# and #" + CStr(Format(DTPickerFin.Value, "mm/dd/YYYY")) +
"# "
Set reg = CN.Execute(SQL)
Set GridGastos.Recordset = reg
 
M

Michel Walsh

Hi,


INT( 0.5+ CDec(x) * 1000) / 1000.0


round x to 4 digits. Use 100 to round to 2 digits.


Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top