Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4028918
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:16:49+00:00 2026-05-20T11:16:49+00:00

I have a question in MS Access 2007 and I hope someone has the

  • 0

I have a question in MS Access 2007 and I hope someone has the answer. I have a long but simple table containing customer names and the days of the week that deliveries are made. I would like to summarize this table by listing the name and all the days into one new field “ALLDays” while still preserving all the data.

The source table looks something like this:

Name         Day  
CustomerA    Monday  
CustomerA    Thursday  
CustomerB    Tuesday  
CustomerB    Friday  
CustomerC    Wednesday  
CustomerC    Saturday  

I would like to have a query which returns results like this:

Name         ALLDays  
CustomerA    Monday, Thursday  
CustomerB    Tuesday, Friday  
CustomerC    Wednesday, Saturday  

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T11:16:49+00:00Added an answer on May 20, 2026 at 11:16 am

    Typically you have to write a function that will allow you to create a concatenated list. Here’s what I’ve used:.

    Public Function GetList(SQL As String _
                                , Optional ColumnDelimeter As String = ", " _
                                , Optional RowDelimeter As String = vbCrLf) As String
    'PURPOSE: to return a combined string from the passed query
    'ARGS:
    '   1. SQL is a valid Select statement
    '   2. ColumnDelimiter is the character(s) that separate each column
    '   3. RowDelimiter is the character(s) that separate each row
    'RETURN VAL: Concatenated list
    'DESIGN NOTES:
    'EXAMPLE CALL: =GetList("Select Col1,Col2 From Table1 Where Table1.Key = " & OuterTable.Key)
    
    Const PROCNAME = "GetList"
    Const adClipString = 2
    Dim oConn As ADODB.Connection
    Dim oRS As ADODB.Recordset
    Dim sResult As String
    
    On Error GoTo ProcErr
    
    Set oConn = CurrentProject.Connection
    Set oRS = oConn.Execute(SQL)
    
    sResult = oRS.GetString(adClipString, -1, ColumnDelimeter, RowDelimeter)
    
    If Right(sResult, Len(RowDelimeter)) = RowDelimeter Then
        sResult = Mid$(sResult, 1, Len(sResult) - Len(RowDelimeter))
    End If
    
    GetList = sResult
    oRS.Close
    oConn.Close
    
    CleanUp:
        Set oRS = Nothing
        Set oConn = Nothing
    
    Exit Function
    ProcErr:
        ' insert error handler
        Resume CleanUp
    
    End Function
    

    Remou’s version has the added feature that you can pass an array of values instead of a SQL statement.


    Sample query might look like:

    SELECT SourceTable.Name
        , GetList("Select Day From SourceTable As T1 Where T1.Name = """ & [SourceTable].[Name] & """","",", ") AS Expr1
    FROM SourceTable
    GROUP BY SourceTable.Name;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have another SQL/access 2007 question that seems really basic but I'm not sure
I have a form in Access 2007 . In the form is a browse-file
I have an Access 2007 database that works asynchronously with a MAS200 database. Due
I am using Access 2007 and have some linked tables to a mySQL database.
I have a database in access 2007 accdb extension , there are more or
My question about the reconfiguration delay when switching between Access 2003 and 2007 the
I have a site that uses classic ASP and a database in Access 2007
I am learning Devart's mydac Data Access Components and I have few question I
I have a question concerning volatile keyword I can't seem to find an answer
I have question about NSView: Imagine a Custom View where the mouseDown, mouseDrag and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.