Dim dr As OleDb.OleDbDataReader = GetData(qry) If dr.HasRows = True Then Do While dr.Read TextBox32.Text = dr.Item("total") If Val(TextBox32.Text) > 800 Then TextBox37.Text = Val(TextBox32.Text) - 800 Else TextBox37.Text = 0 End If TextBox38.Text = Val(TextBox36.Text) + Val(TextBox37.Text) TextBox31.Text = (Val(TextBox33.Text) + Val(TextBox32.Text)) * Val(TextBox34.Text) Loop Else If MsgBox("Fuel allowance not defined for the current month of " & MonthName(currentdate.Month, False) & vbCrLf & _ "Do you want to define it?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Project Payroll") = MsgBoxResult.Yes Then TextBox27.Focus() Else MsgBox("Cannot define allowance without defining fuel allowance", MsgBoxStyle.Critical, "Project Payroll") Exit Sub End If End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)