Results 1 to 3 of 3
  1. #1
    KarenElissa is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Oct 2018
    Posts
    7

    ConcatRelated Help

    I have a database for our Religious Ed program. Families sometimes have more than one child and I'm wanting a query that results in:
    Family Name kid1, kid2, kid3

    I've gotten as far as I need to use ConcatRelated (http://allenbrowne.com/func-concat.html) for that. But now I'm getting an error message, "Error 3061: Too few parameters. Expected 1."



    This is what I have:
    Expr1: ConcatRelated("First_Name","Students","Families.Fa mily_ID=" & [Families].[Family_ID])

    Any help? Thanks!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    the query you are trying to open has a parameter in it.
    what query? Students?

    if students is a table, it may not like the familes.familiyD

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    What is field in Students that has family ID? Show entire query SQL statement. Assuming Family_ID is name of linking fields in both tables and are number type:

    SELECT *, ConcatRelated("First_Name", "Students", "Family_ID=" & [Family_ID]) AS Kids FROM Families;

    It is possible to do this with a CROSSTAB query. Requires a unique record identifier in Students, an autonumber will serve.

    TRANSFORM Max(Students.FirstName) AS MaxOfFN
    SELECT Families.FamilyID, Families.FamilyName
    FROM Families RIGHT JOIN Students ON Families.Family_ID = Students.Family_ID
    GROUP BY Families.Family_ID, Families.FamilyName
    PIVOT DCount("*","Students","Family_ID=" & [Family_ID] & " AND ID<" & [ID])+1 IN (1, 2, 3, 4, 5, 6, 7, 8, 9 10);
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Using ConcatRelated In VBA
    By jo15765 in forum Programming
    Replies: 11
    Last Post: 11-01-2017, 06:08 PM
  2. ConcatRelated
    By bbilotta in forum Programming
    Replies: 28
    Last Post: 03-07-2017, 10:28 PM
  3. concatrelated problem
    By spacerobot in forum Programming
    Replies: 12
    Last Post: 04-05-2016, 08:08 AM
  4. ConcatRelated Help
    By aog928 in forum Programming
    Replies: 4
    Last Post: 09-27-2014, 10:39 AM
  5. When concatrelated() just isn't enough.
    By ork2002 in forum Programming
    Replies: 2
    Last Post: 03-11-2014, 01:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums