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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Datagrid

Status
Not open for further replies.

ghobbes98

Programmer
Feb 7, 2002
62
IE
I am looking to use a datagrid to view some info from a database but I want to filter the information but do not know how to do this as the book that I am using is so helpful it does not quite cover something as practical as this
Does anybody know of any good tutorials that they have used for this
Thanks
G
 
You can use a query to do that.

First create your query to filter all the information you need.

Execute the query to get the result you want.
Populate your data grid based on the result of your query

for example:
strSQL = "SELECT DOB, CustName, CustPhone, CustAddress FROM tblMyTable WHERE DOB BETWEEN #01/25/70# & AND #01/25/75# & "ORDER by DOB"

Adodc1.RecordSource = strSQL
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1.Recordset

Hope this can give you a hint.
 
I knew that it was something like that and thanks for the answer however I want to use this more then just his once so I was looking to learn how to use it fully
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top