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

    Goto specific Record



    Does anybody know how to go to a specific record in a table using VB?


    Here's what i mean

    I have a table with ID, INFO, NOTE


    ID | INFO | NOTE

    ----------------

    1 | Text1| Text1 row1

    2 | Text2| Text2 row2

    3 | Text3| Text3 row3

    -----------------


    what i wanna do is if i entered 2 in a textbox and press enter,

    it'll display the "Text2" in a textbox, and "Text2 row2" in another textbox

    Any help would be appreciated.


    Thank you


    Sang

  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Goto specific Record



    Hi


    Take a look at the 'Seek' method on the RecordSet object - you'll find that

    it does just what you want. I take it you're using Bound Controls for this, if not, you may want to read up on SQL syntax (ie. SELECT field FROM table WHERE ....)


    Regards


    Chris Eastwood

    Codeguru - the website for developers

    http://www.codeguru.com/vb



  3. #3
    Guest

    Re: Goto specific Record

    This is Simple :

    Text Input = 2
    -- for the first text box
    VarInfo = "Text" & (Text Input)
    VarNote = "Text" & (Text Input) & " " & "ROW" & (text Input)
    -- this would take care of the result in the VarInfo and VarNote and they can --- updated in the database

    Arun : [email protected] - Mail me if you still have queries


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