CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 1999
    Posts
    43

    How to search an Access database

    Hello all,

    I am browsing an Access database using simple Data1.Recordset.MoveNext and MovePrevious buttons from my VB program.

    I want to be able to search this database and sort tha data based on some criteria. For example I want to print out everyone who lives in the London area. Then for those who live in the London area I want to print out those who are the oldest in age etc.

    Can someone please show me how to do this since I am a beginner in this.

    Thanks in advance

  2. #2
    Join Date
    Jul 2003
    Location
    Chennai
    Posts
    42
    Use SQL Query with Criteria for the Data Control.


    All the Best !!!

    bye
    Soundar
    your's
    Soundar

  3. #3
    Join Date
    Jul 1999
    Posts
    43

    further help

    Could you please tell me how this is done since I am a total beginer and I dont know how to use the SQL query

    Thanks

  4. #4
    Join Date
    Jul 2003
    Location
    Chennai
    Posts
    42
    Hi,

    Are you using DataControl (DAO) ?.

    In Data Control (properties)

    1. Select the Connect 'Access/Dbase III'

    2. Select the Database Name

    3. In the RecordSource: Select the Table/ enter the Query (Select <Fields> from <TableName> Where <Condition>)


    Just check with this. !

    All the Best !

    regards
    Soundar
    your's
    Soundar

  5. #5
    Join Date
    Jul 1999
    Posts
    43

    Smile Thanks

    Thank you very much fot the help.

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

Featured