QTY_UNIT CMS CMS MTR PCS MTR FTS KGS KGS GMS KGS QTL MTS KGS KGS LBS NOS PCS NOS DOZ DOZ MTR MTR SET SQM GMS GRS GRS GRS MTS PRS DOZ CTN INC SQI ROL BUN BTL KLR BKL BOX PAC YDS MIL ODD LTR TON SQF FTS ODD LOT MTR LBS KME KME TOL HKS THD SDM CON DRM BAG KLR QTL CIN CBM RATE_UNIT CMS MTR CMS PCS FTS MTR KGS GMS KGS QTL KGS KGS MTS LBS KGS NOS DOZ DOZ PCS NOS MTR KME SET SQM GMS PCS NOS GRS MTS PRS DOZ CTN INC SQI ROL BUN BTL LTR BKL BOX PAC YDS MIL NOS LTR TON SQF FTS ODD LOT HMT LBS MTR KME TOL HKS THD SDM CON DRM BAG KLR QTL CIN CBM FACTOR 1 0.01 100 1 3.2808 0.3048 1 1000 0.001 0.01 100 1000 0.001 2.2046 0.45359 1 0.08333 0.08333 12 12 1 0.001 1 1 1 144 144 1 1 1 1 1 1 1 1 1 1 1000 1 1 1 1 1 1 1 1 1 1 1 1 0.01 1 1000 1 1 1 1 1 1 1 1 1 1 1 1 Public Sub cal() Dim sum As Double Dim res As Double With Common_Class.GetSrvRec("i_Unit_Con", "", "QTY_UNIT='" & txtitemunit1.Text.Trim & "'") If .Fields("QTY_UNIT").Value = txtitemunit1.Text Then If .Fields("RATE_UNIT").Value = txtitemunit2.Text Then sum = CInt(txtitemquant.Text) * 1 * CInt(txtitemrate.Text) * CInt(110%) / 100 res = sum txtitempmv.Text = res Else sum = CInt(txtitemquant.Text) * 1000 * CInt(txtitemrate.Text) * CInt(110%) / 100 res = sum txtitempmv.Text = res End If End If End With End Sub