Something is wrong with the select query. How can I add the right thing after (where)?
Private Sub sal_b1_Click(sender As Object, e As EventArgs) Handles sal_b1.Click
If ComboBox3.Text <> "" Then
Try
Me.Refresh()
con.Open()
ds = New DataSet
tables = ds.Tables
da = New OleDbDataAdapter("Select inv_sall2.outdate, inv_sall2.custName, inv_sall2.ac, inv_sall2.subtotal, inv_sall2.taf, inv_sall.itemName, inv_sall.quntity, inv_sall.itemPrice, inv_sall.Tottal From inv_sall INNER Join inv_sall2 On inv_sall.no = inv_sall2.invoceno WHERE (((inv_sall2.invoceno)= '" & ComboBox3.Text & "'));", con)
da.Fill(Form2.hazemDataSet, "datatable1")
Form2.Show()
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
Else
MsgBox("please select the invoice number")
End If
End Sub