this is code i use to call in a record using a textbox and a button
Dim SearchProduct As String = txtBC.Text
Dim con As OleDbConnection = New OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = '" & Application.StartupPath & "\POS.mdb'")
' Use wildcard'
Dim cmd As OleDbCommand = New OleDbCommand("SELECT * FROM Products WHERE SKU= '" & SearchProduct & "' ", con)
'Like state = "SELECT * FROM Products WHERE SKU Like '%" & SearchProduct & "%' ", con
con.Open()
Dim myDA As OleDbDataAdapter = New OleDbDataAdapter(cmd)
Dim POSDataSet1 As DataSet = New DataSet()
If myDA.Fill(POSDataSet1, "Products") Then
DataGridView1.DataSource = POSDataSet1.Tables("Products").DefaultView
ElseIf txtBC.Text = "" Then
BarcodeError2.Show()
Else
BarcodeError.Show()
End If
txtBC.Text = ""
it inserts the record into my datagridview fine but when i enter the second it just replaces the first record scanned. can some please help me, i have been trying for days to get this to function correctly
Thanks
Carl