Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO DISPLAY SEARCH RESULTS OF A DATAGRID

Status
Not open for further replies.

Hiccup

Programmer
Jan 15, 2003
266
US
My VB6 DataGrid is connected to an Access2K mdb Table via an Adodc. When a "Search Clients" Command Button on the Form containing the DataGrid is clicked, I would like to provide an InputBox for the user to enter a value (i.e., a Client name) to find all of the Records that contain the Name the user enters; the same Client might appear in several different Records of the DataGrid. I need the results to display in a DataGrid format on a separate "Search Results" Form - the "Search Results" DataGrid can be the same DataGrid as the original. However, when the user exits the Search Results Form, I need to have the original DataGrid show all of the orginal Records from the mdb Table; probably through an "Update" command I would imagine.

Does anyone have an example of the code to accomplish the above?

Thanks in advance!
 
Hi Hiccup, by reading your question you might be new to VB Database as I am. I assume that because what you want is a “textbook problem”. I am programming the front-end forms in VB6 for about 1.5 months or so with no prior experience in VB or Access! If you are patient and persistent you will get the form you want. Hang in there. However, if my guess is wrong on you please accept my apology.

My best advice for you is to do the following;

Title: Beginning Visual Basic 6 Database
Author: John Connell
Publisher: Wrox

Please read from page 379 to 383. It literally spoon feed you and it is almost exactly what you want to do using Dynamic SQL.

However, I suggest using DAO data-control instead of ADODC because what you want to do is too simple. Just my opinion.

Regards,

P.S. I have no affiliation with the author or the publisher instead I am a mechanical engineer at Oakley Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top