Is there any way of creating a report listing that shows the details in a ‘normal – paragraph fashion’ rather than a long list. I need to limit the depth of a sub-report which contains names associated to each company in the main report. One company has > 20 so i would like just a paragraph of names in this instance.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Report data in rows not columns
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Report data in rows not columns
- This topic has 3 replies, 3 voices, and was last updated 24 years, 4 months ago.
AuthorTopicWSfatherjack
AskWoody LoungerJanuary 4, 2001 at 10:51 am #351555Viewing 1 reply threadAuthorReplies-
WSjimalmaguer
AskWoody LoungerJanuary 6, 2001 at 2:52 pm #509379I can think of two things. Create a subform and link it to your main form using the child field/Parent field Property of the subform. Size the subform on your main form to the largest size you need it to be. Set it’s Can Grow property to NO. Next go to the subform’s page layout to set up as many columns you need and which way you want the data to flow in the columns. When you run the main report the data in the subform will flow into the columns instead of expanding downward. You have to make sure you size the subform properly so that no data is cut off since the Can Grow property is set to NO.
Another option involves coding. You could create an unbound text box and populate it by looping through a recordset in the GroupHeader format event, separating the data by commas. Group By the company and place the text box in the group header not the detail section. Set the Can Grow property to YES. Here is how I have done this using DAO.
Dim dbs As Database, rst As Recordset, strSQl As String
strSQl = “SELECT Employees.CompanyID, ”
strSQl = “Employees.EmployeeName, ”
strSQl = strSQl & “FROM Employees ”
strSQl = strSQl & “WHERE (((Employees.CompanyID)=” & Me.CompanyID & “));”Set dbs = CurrenDb
Set rst = dbs.OpenRecordset(strSQl)With rst
‘Check if there are any records. If not exit.
If .EOF = True And .BOF = True Then
Exit Sub
End IfDo Until .EOF = True
‘If there is no value in the text box add the first name
If Len(Me.txtNames & “”) = 0 Then
Me.txtNames = !EmployeeNameElse
‘Add the next names
Me.txtNames = Me.txtNames & “, ” & !EmployeeName
End If
‘Move to the next record
.MoveNext
Loop
End Withrst.Close
Set rst = Nothing
Set dbs = Nothing -
WSjimalmaguer
AskWoody Lounger
-
WScharlotte
AskWoody LoungerJanuary 7, 2001 at 6:29 am #509489Here’s a code routine that will work in either 97 or 2000 and will return a delimited list of values from the specified table or query field based on the where string you pass it. You could use this in the underlying query. Your field in the query grid might look like this:
Companies: BuildValuesList(“tblCompanies”,”CompanyName”,”[CompanyID]=” & [CompanyID],”/”)
Public Function BuildValuesList(ByVal strTblName As String, _
ByVal strValueField As String, _
ByVal strWhere as String, _
Optional strSeparator As String = “;”) As String
‘Created by Charlotte Foust 1/6/001
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim strValues As String
Dim fldText As DAO.Field
Dim strSQL As StringstrSQL = “SELECT * FROM ” & strTblName & ” ” & strWhere
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset(strWhere, dbOpenSnapshot)
With rst
Set fldText = .Fields(strValueField)
Do While Not .EOF
strValues = strValues & fldText & strSeparator
.MoveNext
Loop
End With
If strValues “” Then
strValues = Left(strValues, Len(strValues) – 1)
End If
Set fldText = Nothing
rst.Close
Set rst = Nothing
Set dbs = Nothing
BuildValuesList = strValues
End FunctionViewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Things You Won’t Like About Impregnaty Do Drewna And Things You Will (Awaiting moderation)
by
garyboudreau3
12 minutes ago -
Sometimes I wonder about these bots
by
Susan Bradley
3 hours, 25 minutes ago -
Does windows update component store “self heal”?
by
Mike Cross
9 hours, 30 minutes ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
10 hours, 30 minutes ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
9 hours, 55 minutes ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
6 hours, 25 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
13 hours, 12 minutes ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
13 hours, 13 minutes ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
1 hour, 47 minutes ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
21 hours, 21 minutes ago -
0Patch, where to begin
by
cassel23
15 hours, 23 minutes ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
1 day, 10 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
22 hours, 44 minutes ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
1 day, 19 hours ago -
A Validation (were one needed) of Prudent Patching
by
Nibbled To Death By Ducks
1 day, 10 hours ago -
Master Patch Listing for May 13, 2025
by
Susan Bradley
21 hours, 38 minutes ago -
Installer program can’t read my registry
by
Peobody
4 hours, 18 minutes ago -
How to keep Outlook (new) in off position for Windows 11
by
EspressoWillie
1 day, 8 hours ago -
Intel : CVE-2024-45332, CVE-2024-43420, CVE-2025-20623
by
Alex5723
1 day, 15 hours ago -
False error message from eMClient
by
WSSebastian42
2 days, 6 hours ago -
Awoke to a rebooted Mac (crashed?)
by
rebop2020
2 days, 15 hours ago -
Office 2021 Perpetual for Mac
by
rebop2020
2 days, 16 hours ago -
AutoSave is for Microsoft, not for you
by
Will Fastie
3 hours, 34 minutes ago -
Difface : Reconstruction of 3D Human Facial Images from DNA Sequence
by
Alex5723
2 days, 20 hours ago -
Seven things we learned from WhatsApp vs. NSO Group spyware lawsuit
by
Alex5723
3 hours, 53 minutes ago -
Outdated Laptop
by
jdamkeene
3 days, 1 hour ago -
Updating Keepass2Android
by
CBFPD-Chief115
3 days, 7 hours ago -
Another big Microsoft layoff
by
Charlie
3 days, 6 hours ago -
PowerShell to detect NPU – Testers Needed
by
RetiredGeek
9 hours, 7 minutes ago -
May 2025 updates are out
by
Susan Bradley
10 hours, 48 minutes ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.