We help IT Professionals succeed at work.
Get Started

Microsoft Access to VB6 MsFlexfrid

Wilder1626 asked
Last Modified: 2012-06-27
Hello all.

I need your help with a search tool in VB6.

I have a calendar and a common button. I would like to select a date and when i would click on the button, it would search in my Access db in the first column called "Date", and brign all the line in my MSFlexgrid1.

How can i do this?

Since i dont know what info i need to tell you, here is the code that i have to feed a combo box in the same form.

Thanks again for your help
Private Sub Form_Load()

Dim sSQL2 As String
  Dim oConnect2 As ADODB.Connection
  Set oConnect2 = New ADODB.Connection
  Dim oRST2 As ADODB.Recordset
  Set oRST2 = New ADODB.Recordset

sSQL2 = "SELECT [Produits]FROM [Description produit]'"

oConnect2.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & Form4.txtBaseDe.Text

oRST2.Open sSQL2, oConnect2
Do Until oRST2.EOF
  Des_prod.AddItem oRST2("Produits")

End Sub

Open in new window

Watch Question
This problem has been solved!
Unlock 2 Answers and 13 Comments.
See Answers
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