0

Call Open_conn
If BEdt = False Then
Rs.Open "Select * from tblpayroll where EmployeeID='" + Trim(txtEmpID.Text) + " '", Cn
If Rs.EOF = False Then
MsgBox "Duplicate Employee ID", vbInformation, "Duplicate"
Else
Cn.Execute "Insert into tblpayroll values('" + Trim(txtEmpID.Text) + "', '" _
+ Trim(txtfullname.Text) + "','" + Trim(cbogender.Text) + "','" _
+ Trim(cbostatus.Text) + "','" + Trim(txtposition.Text) + "')'" _
+ Trim(txtBs.Text) + "','" + Trim(cboEStatus.Text) + "','" _
+ Trim(txtAdd.Text) + "','" + Trim(txtContact.Text) + "','" _
+ Trim(txtSSS.Text) + "','" + Trim(txtTin.Text) + "','" _
+ Trim(txtphil.Text) + "')"";"
MsgBox "New Record Saved!", vbInformation, "Employee Info"
End If

Close_Conn

end sub

what should i do?
tnx in advance....

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by mustaffa hasan
0

Exactly what the title says...

Look closely at line 3.

Rs.Open "Select * from tblpayroll where EmployeeID= '"+ Trim(txtEmpID.Text) +"' ", Cn
0

Call Open_conn
If BEdt = False Then
Rs.Open "Select * from tblpayroll where EmployeeID='" + Trim(txtEmpID.Text) + " '", Cn
If Rs.EOF = False Then
MsgBox "Duplicate Employee ID", vbInformation, "Duplicate"
Else
Cn.Execute "Insert into tblpayroll values('" + Trim(txtEmpID.Text) + "', '" _
+ Trim(txtfullname.Text) + "','" + Trim(cbogender.Text) + "','" _
+ Trim(cbostatus.Text) + "','" + Trim(txtposition.Text) + "')'" _
+ Trim(txtBs.Text) + "','" + Trim(cboEStatus.Text) + "','" _
+ Trim(txtAdd.Text) + "','" + Trim(txtContact.Text) + "','" _

  • Trim(txtSSS.Text) + "','" + Trim(txtTin.Text) + **"*';"****Bold Text Here
  • _" we get just change lightly and see
    MsgBox "New Record Saved!", vbInformation, "Employee Info"
    End If

Edited by mustaffa hasan

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.