vb6 Search database and display on datagrid

Posted 29 September 2012 - 10:37 AM

Hi I have a problem, I am making a tracking software with a database, up until now I had no problems but now I want to create a tracking form which would find specific records based on the tracking number. my form contains a textbox which will be used to enter the tracking number and a search button to find it, I also have a datagrid to view the records.

When I run the program I can see all of the records on the grid but what I want is when I type in the tracking number and press search it would only show me the record with that number and nothing else.

example:

This is what I can see now:
shipper name || shipper address || tracking number
-------------||-----------------||-----------------
john 12 street 1
jake 14 street 2

if I type '1' into the textbox I want to only see john's record but at this point I can see everyone.
I know that is should be something along the lines of