comparing values..........

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sumuka
    New Member
    • Oct 2007
    • 38

    comparing values..........

    Hello Everyone,

    I'm doing a project in VB 6.0 and i've a flexgrid which contains some numerical values in it's cell now i need to compare these values present in flexgrid with the values in the backend access database table which has 2 columns RID and description. After comparing the flexgrid value with RID i need to select the rows which are similar for example i've no 8 and 24 in flexgrid now i need to compare this with access table and check if it has 8 and 24 if it has then i need to print the description corresponding to it in the flexgrid .

    Please help me with the code.....
    Thanks in anticipation,
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    Open a Recordset for that Table,
    Loop through the FlexGrid Rows, and use "Find" method of the Recordset, and get the description..
    creating Index on the Field would Increase the find speed..

    If using DAO, open recordset in Table and use "Seek"
    Seek is faster than Find..and Seek requires Indexing

    Regards
    Veena

    Comment

    • sumuka
      New Member
      • Oct 2007
      • 38

      #3
      Originally posted by QVeen72
      Hi,

      Open a Recordset for that Table,
      Loop through the FlexGrid Rows, and use "Find" method of the Recordset, and get the description..
      creating Index on the Field would Increase the find speed..

      If using DAO, open recordset in Table and use "Seek"
      Seek is faster than Find..and Seek requires Indexing

      Regards
      Veena

      Thanks for your interest the problem is im new to vb so can u guide me with the code sample and tel me where to put the code..

      Thanks & Regards,

      Comment

      Working...