This tutorial is all about Searching Columns Value in MS Access Using VB.Net. In this post i will teach you on Searching Columns Value in MS Access Using VB.Net. So let’s get started:
As a continuation of this tutorial. We will use the Displaying Data Table Records in Datagridview using VB.Net
- First, Design your Form like this one below.
Add a Textbox and a Button.
- After designing the form add this following declaration.
- Public dbdt As New DataTable
- Click the Search Button and Add this code.
- Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
- dbdt = New DataTable
- With dbcmd
- .Connection = Myconnection
- .CommandText = "Select * from tblitems where ITEMNAME like '" & TextBox4.Text & "%'"
- End With
- dbda.SelectCommand = dbcmd
- DataGridView1.DataSource = dbdt
- Catch ex As Exception
- End Try
- End Sub
- Then Click F5 to Run the Program.
If you have any comments or suggestions about on Searching Columns Value in MS Access Using VB.Net, please feel free to contact our webpage.
Download Searching Columns Value in MS Access Using VB.Net Here
Other Articles Readers might read: