M
M.D. Exausted
I have a query which grabs a set of records based on a set of criteria. I
then need to perform some analysis on that record set, however when I enable
the "totals" line, I get error 3125 " " is not a valid name...." If I make a
table of the query instead, and then create a new query from the new table,
I'm able to utilize the totals functions. However, most of these record sets
are anywhere from 5k - 30k records, and I need to run dozens of these
queries. I have a table set up with multivalued fields to save the search
criteria, and use the .value property to filter the results.
Here's the code before:
SELECT Master02.[XNSGO No], Master02.Style, Master02.Flute, Master02.ECT,
Master02.Burst, Master02.Length, Master02.Width, Master02.Depth,
Master02.[Square Footage], Master02.USB, Master02.[Total QTY],
Master02.[Price (IND)], Master02.[Cost (Total)]
FROM Master02, [Search Query]
WHERE (((Master02.Style)=[Search Query]![Style].[Value]) AND
((Master02.Flute)=[Search Query]![Search.Flute.Value]) AND
((Master02.ECT)=[Search Query]![Search.ECT.Value]) AND
((Master02.Burst)=[Search Query]![Search.Burst.Value]) AND
((Master02.USB)=[Search Query]![Search.USB.Value]));
And this is the code after I hit the "totals" option:
SELECT Master02.[XNSGO No], Master02.Style, Master02.Flute, Master02.ECT,
Master02.Burst, Master02.Length, Master02.Width, Master02.Depth,
Master02.[Square Footage], Master02.USB, Master02.[Total QTY],
Master02.[Price (IND)], Master02.[Cost (Total)]
FROM Master02, [Search Query]
GROUP BY Master02.[XNSGO No], Master02.Style, Master02.Flute, Master02.ECT,
Master02.Burst, Master02.Length, Master02.Width, Master02.Depth,
Master02.[Square Footage], Master02.USB, Master02.[Total QTY],
Master02.[Price (IND)], Master02.[Cost (Total)]
HAVING (((Master02.Style)=[Search Query]![Style].[Value]) AND
((Master02.Flute)=[Search Query]![Search.Flute.Value]) AND
((Master02.ECT)=[Search Query]![Search.ECT.Value]) AND
((Master02.Burst)=[Search Query]![Search.Burst.Value]) AND
((Master02.USB)=[Search Query]![Search.USB.Value]));
This gives me the error code, regardless of how I configure the grouping
(I'm aware that this unconfigured grouping would return no unique clusters).
then need to perform some analysis on that record set, however when I enable
the "totals" line, I get error 3125 " " is not a valid name...." If I make a
table of the query instead, and then create a new query from the new table,
I'm able to utilize the totals functions. However, most of these record sets
are anywhere from 5k - 30k records, and I need to run dozens of these
queries. I have a table set up with multivalued fields to save the search
criteria, and use the .value property to filter the results.
Here's the code before:
SELECT Master02.[XNSGO No], Master02.Style, Master02.Flute, Master02.ECT,
Master02.Burst, Master02.Length, Master02.Width, Master02.Depth,
Master02.[Square Footage], Master02.USB, Master02.[Total QTY],
Master02.[Price (IND)], Master02.[Cost (Total)]
FROM Master02, [Search Query]
WHERE (((Master02.Style)=[Search Query]![Style].[Value]) AND
((Master02.Flute)=[Search Query]![Search.Flute.Value]) AND
((Master02.ECT)=[Search Query]![Search.ECT.Value]) AND
((Master02.Burst)=[Search Query]![Search.Burst.Value]) AND
((Master02.USB)=[Search Query]![Search.USB.Value]));
And this is the code after I hit the "totals" option:
SELECT Master02.[XNSGO No], Master02.Style, Master02.Flute, Master02.ECT,
Master02.Burst, Master02.Length, Master02.Width, Master02.Depth,
Master02.[Square Footage], Master02.USB, Master02.[Total QTY],
Master02.[Price (IND)], Master02.[Cost (Total)]
FROM Master02, [Search Query]
GROUP BY Master02.[XNSGO No], Master02.Style, Master02.Flute, Master02.ECT,
Master02.Burst, Master02.Length, Master02.Width, Master02.Depth,
Master02.[Square Footage], Master02.USB, Master02.[Total QTY],
Master02.[Price (IND)], Master02.[Cost (Total)]
HAVING (((Master02.Style)=[Search Query]![Style].[Value]) AND
((Master02.Flute)=[Search Query]![Search.Flute.Value]) AND
((Master02.ECT)=[Search Query]![Search.ECT.Value]) AND
((Master02.Burst)=[Search Query]![Search.Burst.Value]) AND
((Master02.USB)=[Search Query]![Search.USB.Value]));
This gives me the error code, regardless of how I configure the grouping
(I'm aware that this unconfigured grouping would return no unique clusters).