1 Attachment(s)
[RESOLVED] How to round the number for string data type field name?
I have problem here, I used text data type for all these field name. I don't know how to round these number. I got 3.4189189.. after calculating the value. How I can round these number to be like this 3.412 ?
Code:
Fields("Hasil Kasar (kg)").Value = Text2.Text
Text3.Text = Val(Text2.Text) / 1000 / Label10.Caption
.Fields("Purata Hasil Kasar (Tan/ha)").Value = Text3.Text
Text4.Text = Text2.Text - (Text2.Text * 17) / 100
.Fields("Hasil Bersih (-17 %)").Value = Text4.Text
Text5.Text = Text3.Text - (Text3.Text * 17) / 100
.Fields("Purata Hasil Bersih (Tan/ha)").Value = Text5.Text
Re: How to round the number for string data type field name?
Use Round() function:
=Round(Val(Text5.Text), 3)