Results 1 to 2 of 2

Thread: DataGrid using ADO

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    2

    Question

    I am using an input box to allow the users to enter a string that they want to search on. Then it will pull up a datagrid with selected records based on the searchcriteria. The problem that I am having is that it is pulling all the records from the table. I am using Access and ADO. Any help in getting this to work is greatly appreciated.
    Thanks

  2. #2
    Hyperactive Member barrk's Avatar
    Join Date
    Sep 2000
    Location
    My own little world
    Posts
    274

    As I said on the VB General section:

    datagrid.datasource = adodc
    myvalue = inputbox.text
    mysql = "select * from mytable where myfield = '" & myvalue & "'"
    adodc.recordsource = mysql
    adodc.refresh


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width