Results 1 to 5 of 5
  1. #1
    aog928 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    3

    ConcatRelated Help

    I've searched and searched and have not found a solution anywhere so I decided to ask here, sorry if this has been answered before...



    I've got two tables, OwnersTable and PropertyTable where a single "Owner" can own multiple "Property"

    So here's what I've got...

    Code:
    SELECT NamesTable.Name, ConcatRelated("Property",”PropertyTable”,"OwnerIDx = " & “OwnerID”) AS Expr1
    FROM NamesTable INNER JOIN PropertyTable ON NamesTable.OwnerID = PropertyTable.OwnerIDx;
    I've tried this several ways, but get the same result... I get two consecutive input boxes "PropertyTable" and "OwnerIDx" and get an error code regardless of what I enter in them...

    Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The posted SQL shows two styles of quotation marks. How did that happen? VBA doesn't like the slanted marks.

    Is OwnerID a number type field?

    Try without the table join.

    SELECT [Name], ConcatRelated("Property", "PropertyTable", "OwnerIDx=" & [OwnerID]) AS OwnerProperties FROM NamesTable;

    Name is a reserved word - should avoid reserved words as field names.
    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.

  3. #3
    aog928 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    3
    I was copying and pasting from several sites trying to copy the code and may have copied the "slanted" quotes from there, creating a whole new problem...

    Thanks again.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Think my initial post was wrong so I edited. Might review it again.
    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.

  5. #5
    aog928 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    3
    Yes at first glance it looked like it worked, finally came back and copied your code and it magically worked, then I realized you had edited you post...

    I edited my initial response to not confuse anyone else looking for a solution...

    Thanks again...

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

Similar Threads

  1. When concatrelated() just isn't enough.
    By ork2002 in forum Programming
    Replies: 2
    Last Post: 03-11-2014, 01:32 AM
  2. Replies: 2
    Last Post: 07-12-2013, 06:55 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