Results 1 to 2 of 2

Thread: Search data and display in grid

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    51

    Post

    I'm trying to code a form that will pop-up a field to search and then show the result data into the grid form. Any helps and suggestions to get this are appreciate.

    Data: MS-Access 97
    Dataconnect: Visual Basic 6 Data-environment
    Table: 1 table with 6 field
    records: 3000+

    Thanks.

  2. #2
    Junior Member
    Join Date
    Jan 2000
    Location
    Christchurch, New Zealand
    Posts
    19

    Post

    Since noone else has jumped in here

    The easiest I can think of is to put a data control, DBGrid, Command button and a text box on a form. Set the data control to point to the database and table you would like. Set the DBGrid to get its DataSource from the datacontrol. Right click on the DBGrid at design time, select Retrieve Fields. This should throw all the fields found in the table into the DBGrid, you may need to fiddle with formatting.

    Then depending on how you want to search for info ... you can either set the RecordSource of the data control based on what you type in the text box or use a FindFirst command.

    The Command button has aesthetic qualities, but should be used to action the FindFirst or RecordSource altering command.

    Cheers Dave
    aka Lil Dave

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