You deleted the "FROM" from my expression. Try again:
SELECT GRID_ID,
Concatenate("SELECT Sliver_ID FROM [Sliver Tracking] WHERE Grid_ID =" &
[Grid_ID])
as Slivers
FROM [Sliver Tracking]
GROUP BY Grid_ID,
Concatenate("SELECT Sliver_ID FROM [Sliver Tracking] WHERE Grid_ID =" &
[Grid_ID]);
--
Duane Hookom
MS Access MVP
This is what I have and it tells me i have an error in my From clause
SELECT GRID_ID,
Concatenate("SELECT Sliver_ID [Sliver Tracking] WHERE Grid_ID =" &
[Grid_ID])
as Slivers
FROM [Sliver Tracking]
GROUP BY Grid_ID,
Concatenate("SELECT Sliver_ID FROM [Sliver Tracking] WHERE Grid_ID =" &
[Grid_ID]);
:
You need to view the SQL view of your query and paste this SQL view
SELECT GRID_ID,
Concatenate("SELECT Sliver_ID FROM tblNoName WHERE GRID_ID =" &
[GRID_ID])
as Slivers
FROM tblNoName
GROUP BY GRID_ID,
Concatenate("SELECT Sliver_ID FROM tblNoName WHERE GRID_ID =" &
[GRID_ID]);
--
Duane Hookom
MS Access MVP
Sorry I'm asking so many questions about this. So, I made a new
query
with
just the fields from the Sliver Tracking Table. I typed in what is
listed
below in a field. I get a syntax error telling me to check and
enclose
subquery in parentheaes.
When you say totals query, what does that mean?
:
Try this totals query:
SELECT GRID_ID, Concatenate("SELECT Sliver_ID FROM tblNoName WHERE
GRID_ID
=" & [GRID_ID]) as Slivers
FROM tblNoName
GROUP BY GRID_ID, Concatenate("SELECT Sliver_ID FROM tblNoName
WHERE
GRID_ID
=" & [GRID_ID]);
--
Duane Hookom
MS Access MVP
My fields are: Grid_ID, Sliver_ID, Grid_ID2, and Date of Dig.
The
first
3
are number fields and the last is date. For each grid ID, I
would
like
all
the sliver ids to be in 1 row just separated by commas.
I imported the module but I just don't know what to change.
:
Did you import the module into your application?
What are your table and field names? Are the fields numeric or
text?
--
Duane Hookom
MS Access MVP
I looked at that and gave it try but it's not working. I don't
have
that
much knowledge about access so this may jsut be over my head.
:
There is a generic concatenate function with sample usage at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane.
--
Duane Hookom
MS Access MVP
message
I have a Pt ID field which is a unique number. I have a
S_field
which
is
an
ID # that lines to the Pt ID. There are multiple Pt ID's
for
one
S_field
ID.
When I make the report, it puts each separate S-field on a
different
line.
Is it possible to get all the Pt ID's associated with 1
S_field
to
be
in 1
row.
It would like like S-Field Pt ID
31 1,2,3,4