Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Question on Detail Line

Status
Not open for further replies.

benaround2

Programmer
Jun 24, 2005
14
US
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.

Can you give me the line of VBA code to display the detail line on a report?

Thanks ahead of time
 
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. :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top