i am working on a vb project . in this i need to save some record to one table and update some records in another table in one event or click .. i am doing like this .
Conn.Execute "insert into DailyStock(serial,category,model,datee,opnstock,supply,phystk,totalsale,ssale,nsale,totalstock)values(" & txtserial.Text & ",'" & CboCategory.Text & "','" & CboModel.Text & "','" & DTPicker1 & "'," & txtopnstock.Text & "," & txtsupply.Text & "," & txtphystk.Text & "," & txttsale.Text & "," & txtssale.Text & "," & txtnsale.Text & "," & txtstock.Text & ") ; update Menu set phystk=" & txtstock & " where ItemName='" & CboModel & "'"
MsgBox ("Data Saved Successfully")
but it giving error as “character found after sql statement” .. i am not getting where i go wrong .. please help me
You can only run one statement at a time in MS Access. Everything after the “;” is a character found after sql statement.