Click to See Complete Forum and Search --> : Goto specific Record


Sang
March 21st, 1999, 03:01 PM
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

Chris Eastwood
March 21st, 1999, 05:00 PM
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

April 21st, 2000, 11:48 AM
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 : meow100@rocketmail.com - Mail me if you still have queries