We help IT Professionals succeed at work.
Get Started

Filter a form : Like MsAccess ctrl+F

Fordraiders asked
Last Modified: 2012-05-09
VB.NET 2008
Form1 that is unbound to a dataset.

I want to filter the form1 via a frmlookup form..

Type something in textbox1" on "frmLookup" and then filter the data on Form1.

Form1 declarations:
Dim das1 As New System.Data.DataSet()
Dim cnn1 As New OleDb.OleDbConnection( _
                "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                "Data Source=c:\Program Files\" & _
    Dim query As String = "SELECT * FROM tblMainData" ' Order By MainTableID DESC "
   Dim dap1 As New System.Data.OleDb.OleDbDataAdapter(query, cnn1)

' form1 load event
'Fill the tblMainData table
dap1.Fill(das1, "tblMainData")

Hit a key combination like ctrl+f  and the frmLookup" popus up.

type in a search value in  textbox1  and use the field   "fldMfrnum"  in "das1"


Watch Question
Staff Software Engineer
This problem has been solved!
Unlock 1 Answer and 32 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE