i have two text box's and compare from two columns in database the result auto show another text box and then following below code using my program
Code:
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
Comment