If Combo1.Text = "" Then
MsgBox "Please Choose Supplier Code"
Combo1.SetFocus
Exit Sub
End If
If Combo2.Text = "" Then
MsgBox "Please Choose Product Code"
Combo2.SetFocus
Exit Sub
End If
If Text1.Text = "" Then
MsgBox "Please Input the Quantity"
Text1.SetFocus
Exit Sub
End If
If Text3.Text = "" Then
MsgBox "Please Input the Amount"
Text3.SetFocus
Exit Sub
End If
cn.Execute "Insert Into Deliver (scode, pcode, quantity, unit, amount, pcarrier, pterms, drnumber, date) Values ('" + Combo1.Text + "','" + Combo2.Text + "'," + Text1.Text + "," + Text2.Text + "," + Text3.Text + "," + Text4.Text + "," + Text5.Text + "," + Text6.Text + "," + Text7.Text + ")", cn, adOpenKeyset, adLockPessimistic
rs1.Open "select * from Product where pcode='" & Combo2.Text & "'", cn, adOpenDynamic, adLockOptimistic
If rs1.RecordCount > 0 Then
rs1.Fields![pstock] = Val(rs1.Fields![pstock]) + Val(Text1.Text)
rs1.Update
rs1.Close
MsgBox "The Product has been save successfully", vbInformation
Combo1.Text = ""
Combo2.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Call Form_Load
Else
MsgBox "OHH NO!", vbInformation
End If
Compile Error:
wrong Number of agruments or invalid property assignment