how do i display results from a query where there is multiple rows returned?
Posted on 2006-05-17
i have an app that i need to display query results on a form. The user then needs to pick which result from the query is correct(this will then take them to another form and populate text boxes with the correct data. The results from the query can be in a textbox or whatever, as long the user can click a button next to the query result they need.
this is what i have so far(this is the results form, it holds the results from the query)
Private Sub Form_Load()
Dim objConn As ADODB.Connection
Dim objRS As ADODB.Recordset
Dim strUser As String
Dim strSQL As String
Set objConn = New ADODB.Connection
Set objRS = New ADODB.Recordset
objConn.CursorLocation = adUseServer
strUser = frmMain.Text1.Text
strSQL = "Select * from tblOwnerData where HomesteadID Like " & "'" & strUser & "%'"
objRS.Open strSQL, objConn, adOpenDynamic, adLockOptimistic
Thank in advance.