1 Replies - 12731 Views - Last Post: 30 September 2012 - 01:47 AM Rate Topic: -----

#1 Tolerated  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 29-September 12

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.


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
adodc1.recordsource = Select * from customer
but I don't know the rest.

if someone has any ideas please help it would be appreciated.

Is This A Good Question/Topic? 0
  • +

Replies To: vb6 Search database and display on datagrid

#2 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 330
  • View blog
  • Posts: 1,997
  • Joined: 26-March 09

Re: vb6 Search database and display on datagrid

Posted 30 September 2012 - 01:47 AM

You need a WHERE clause in your query to filter your records.

Look here for more details.

This post has been edited by maj3091: 30 September 2012 - 01:47 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1