Another approach to this is to create a concatenated string from the PKs of the result set and then parse that within a stored procedure elsewhere in your Front End (FE). For more information on this, visit www.artfulsoftware.com and check out the Queries page.
Arthur