INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS
Come Join Us!
Are you a
Computer / IT professional?
Join Tek-Tips now!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts
- Keyword Search
- One-Click Access To Your
- 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.
Partner With Us!
"Best Of Breed" Forums Add Stickiness To Your Site
(Download This Button Today!)
"...I just wanted to say how much I have enjoyed these forums. I am a new user and have a lot of elementary questions. I get quick answers with a friendly attitude..."
Where in the world do Tek-Tips members come from?
Create a horizontal delimited list of records
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
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]
Back to Microsoft: Access Reports FAQ Index
Back to Microsoft: Access Reports Forum
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:
- Talk To Other Members
- Notification Of Responses To Questions
- Favorite Forums One Click Access
- Keyword Search Of All Posts, And More...
Register now while it's still free!
Already a member? Close this window and log in.
Join Us Close