search in DBGRID

here is the question :->
say I have retrieved 100s of rows of data in dbgrid eg names of employees,now I want to find eg John smith , one way to do this is to force the user to look through rows and find it OR we may give them the find option as in MS word, but how can I put the cursor to that particular column matching the search result and make that column highlighted?

You can use any pattern that is valid in recordset's search. When to record is found, no matter what the criteria is, the dbgrid's current record set t the record that was found. Then you just need to put the selection to the column you were searching using the .cols proprty. If you post a specific situation, i will give a sample code.

Featured Post

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…

Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…