Hi I am new to this forum and am a novice with macros. I have been struggling with ConcatRelated If I create the basic orders table show in the example:
orders
Company OrderDate
Acme Corporation 1/1/2007
Acme Corporation 3/1/2007
Acme Corporation 7/1/2000
Acme Corporation 1/1/2008
Wright Time Pty Ltd 4/4/2007
Wright Time Pty Ltd 9/9/2007
Zoological Parasites
and then run this query:
ConcatRelated("OrderDate","Orders","[Company] = """ & [Company] & """")
Then I don't get the results given on the web page but instead get one output record per record in the table, viz:
Company Expr1
Acme Corporation 1/1/2007, 3/1/2007, 7/1/2000, 1/1/2008
Acme Corporation 1/1/2007, 3/1/2007, 7/1/2000, 1/1/2008
Acme Corporation 1/1/2007, 3/1/2007, 7/1/2000, 1/1/2008
Acme Corporation 1/1/2007, 3/1/2007, 7/1/2000, 1/1/2008
Wright Time Pty Ltd 4/4/2007, 9/9/2007
Wright Time Pty Ltd 4/4/2007, 9/9/2007
Zoological Parasites
I have seen one suggestion to change "SELECT" in the macro to "SELECT DISTINCT" but that made no difference.
Any help would be much appreciated.
orders
Company OrderDate
Acme Corporation 1/1/2007
Acme Corporation 3/1/2007
Acme Corporation 7/1/2000
Acme Corporation 1/1/2008
Wright Time Pty Ltd 4/4/2007
Wright Time Pty Ltd 9/9/2007
Zoological Parasites
and then run this query:
ConcatRelated("OrderDate","Orders","[Company] = """ & [Company] & """")
Then I don't get the results given on the web page but instead get one output record per record in the table, viz:
Company Expr1
Acme Corporation 1/1/2007, 3/1/2007, 7/1/2000, 1/1/2008
Acme Corporation 1/1/2007, 3/1/2007, 7/1/2000, 1/1/2008
Acme Corporation 1/1/2007, 3/1/2007, 7/1/2000, 1/1/2008
Acme Corporation 1/1/2007, 3/1/2007, 7/1/2000, 1/1/2008
Wright Time Pty Ltd 4/4/2007, 9/9/2007
Wright Time Pty Ltd 4/4/2007, 9/9/2007
Zoological Parasites
I have seen one suggestion to change "SELECT" in the macro to "SELECT DISTINCT" but that made no difference.
Any help would be much appreciated.