Number Conversion Problem - 2 dec places

G

Gina

Hi.

How can I convert a number which has 3 or 4 decimal places into one with
only 2 decimal places

From: 20.1354
To: 20.13

I would like to insert it into a table via an insert query and the
FormatCurrency$(x,2) doesn't get accepted by the table
it includes the ? sign

Gina
 
R

RD

Hi.

How can I convert a number which has 3 or 4 decimal places into one with
only 2 decimal places

From: 20.1354
To: 20.13

I would like to insert it into a table via an insert query and the
FormatCurrency$(x,2) doesn't get accepted by the table
it includes the ? sign

Gina



Dim MyNum As String
MyNum = "345.2369"
Debug.Print Format(MyNum, "###0.00")

Produces: 345.24

HTH,
RD
 
J

John Vinson

Hi.

How can I convert a number which has 3 or 4 decimal places into one with
only 2 decimal places

From: 20.1354
To: 20.13

I would like to insert it into a table via an insert query and the
FormatCurrency$(x,2) doesn't get accepted by the table
it includes the ? sign

Try

Round(x, 2)


John W. Vinson[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