|
-
Nov 30th, 2002, 07:25 PM
#1
Thread Starter
Junior Member
recordset: Why does it only display the last record?
on button click event:
dim atext as string
atext=text1.text
rs.Open "SELECT Name,Address,Category FROM tbl_sample WHERE Name='" & atext & "' ORDER BY Name", cn
rs.MoveFirst
Do Until rs.EOF = True
Text2.Text = rs!Name & vbCrLf & rs!Address & vbCrLf & rs!Category & vbCrLf & vbCrLf
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
there are a total of 5 records/rows.
but the text2 box only displays the last one.
i suspect the problem is in the loop.
pls help. thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|