benaround2
Programmer
In creating a recordset for use in a MS Access 2000 report, I am going through the recordset OK. I know this because I use debug.print and everything looks good.
I take the query results and put them into unbound fields on the report but the the report only displays the last line.
As a FYI, here is the attached code:
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "query1", CurrentProject.Connection, adOpenKeyset, adLockOptimistic, adCmdTable
rs.MoveFirst
Do While ((Not rs.Status) And (Not rs.EOF))
[FormName]!fielda = rs.Fields("fieldaID")
rs.MoveNext
Loop
rs.Close
BTW, this loop also does not stop at EOF. If you know that fix, thanks double.
Can you give me the line of VBA code to display the detail line on a report?
Thanks ahead of time
I take the query results and put them into unbound fields on the report but the the report only displays the last line.
As a FYI, here is the attached code:
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "query1", CurrentProject.Connection, adOpenKeyset, adLockOptimistic, adCmdTable
rs.MoveFirst
Do While ((Not rs.Status) And (Not rs.EOF))
[FormName]!fielda = rs.Fields("fieldaID")
rs.MoveNext
Loop
rs.Close
BTW, this loop also does not stop at EOF. If you know that fix, thanks double.
Can you give me the line of VBA code to display the detail line on a report?
Thanks ahead of time