searching for a matching record in a recordset 
Author Message
 searching for a matching record in a recordset

if given a value from a text field, how can one tell the database (ado) to search
along one field until it finds it and then return another field elsewhere from
the same recordset?  throughly stumpted...


Sun, 30 Nov 2003 23:16:23 GMT  
 searching for a matching record in a recordset


if given a value from a text field, how can one tell the database (ado) to
search
along one field until it finds it and then return another field elsewhere
from
the same recordset?  throughly stumpted...

rsADO.open "Select field1,field2, from [table] where field1 = '" & string &
"' ;",connection,adopenstatic,adlockoptimisitic,adcmdtext
if rsado.eof and rsado.bof then
msgbox "No record!"
endif
rsado.movefirst

answer = rsado![field2]

rsado.close

Joe



Mon, 01 Dec 2003 05:12:37 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Checking for matching records in two tables with different record structures

2. VB%: Finding matching records in a Record set...

3. Help with recordset to search one record.

4. Module-level multiple-record recordset vs temp single-record recordset

5. Module-level multiple-record recordset vs temp single-record recordset

6. searching items and pattern matching

7. searching listview for partial match with text

8. searching history that matches substring in url for IE

9. SQL Search with no matching results

10. Can I do dynamic partial match search like in Access (AutoExpand)

11. Search / Match hundreds of boolean fields

12. searching a file for matching data

 

 
Powered by phpBB® Forum Software