I checked my spellings and everything for so many times already
Here's the code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Not cnn.State = ConnectionState.Open Then
'open connection if it is not yet open
cnn.Open()
End If
cmd.Connection = cnn
'check whether add new or update
'add new
'add data to table
cmd.CommandText = " INSERT INTO JandKstock( Product_Name, Stock, Sold_Item, Stock_Remaining, Unit_Price, Quantity_Price, Total_Sales)" & _
" VALUES(" & Me.Product_NameTextBox.Text & ",'" & Me.StockTextBox.Text & "','" & Me.Sold_ItemTextBox.Text & "','" & Me.Stock_RemainingTextBox.Text & "','" & Me.Unit_PriceTextBox.Text & "','" & Me.Quantity_PriceTextBox.Text & "','" & Me.Total_SalesTextBox.Text & "')"
cmd.ExecuteNonQuery()
'refresh data in list
RefreshData()
'clear form
Me.btnClear.PerformClick()
'close connection
cnn.Close()
End Sub