Want to change the value stored in the bold, it's a code to calculate the payroll.
Solution to this please, thanks in advance.
Code:
If txttr.Text = "" Then Form2.txttamt.Text = "" MsgBox "enter the tax rate", vbOKOnly, "ERROR" 'Form2.txttamt.Text = "" cbostate.SetFocus Else [B]res1 = txttr.Text / 100[/B] End If rs.Open "Select * From empdetail Where name = '" & ListView1.SelectedItem & "' ", conn, adOpenStatic, adLockOptimistic a = rs!whours txtoh.Text = Val(txthrs.Text - a) txtotamt.Text = Val(Form2.txtoh * Form2.txtotrt) res = Val(Form2.txthrs.Text * Form2.txtrate.Text) Form2.txttamt.Text = Val(res * res1) Form2.txtgros.Text = Val((txthrs.Text * txtrate.Text) - (txttamt.Text)) 'str1 = txttr.Text Form2.txtnsal.Text = Val(Form2.txtgros.Text - Form2.txttamt) rs.Close Set rs = Nothing
Comment