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.