Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Microsoft: Access Reports FAQ

How To

Create a horizontal delimited list of records by CosmoKramer
Posted: 15 May 03

Here is a way to create a horizonal list of records without the need for re-reading a recordset. It uses the detail already provided in the report.

But, this method requires hiding the detail section, so if that is not an option for your report this probably won't work.

In this example, ClassID is the group field, and Student the detail field.

1. Place the Student field in the detail section and set the section's Visible property to No.

2. In the group footer:
   Place the ClassID field and an unbound text box (txtStudents) next to the ClassID field. You may have to set the CanGrow property of this text box to Yes.

3. In the Declarations section of the report, add a global variable:

Option Compare Database  
Option Explicit

Dim FirstTimeThru As Integer

4. In the OnFormat event of the group header, enter code like this to initialize the variable and txtStudents:

FirstTimeThru = False
Me!txtStudents = Null

5. In the OnFormat event of the detail section, put code like this to concatenate the students on each pass through the section:

If Not FirstTimeThru Then
            Me!txtStudents = Me![Student]
            FirstTimeThru = True
            Me!txtStudents = Me!txtStudents & ", " & Me![Student]
         End If

Back to Microsoft: Access Reports FAQ Index
Back to Microsoft: Access Reports Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close