I have looked at your query
It seems you are wanting to Sum the NoOfClips, but that field is defined as short text.
There are values like "VEL" and "no clips" that are strings, and, while they are valid stings, they can not be summed.
When I use this query:
Code:
SELECT Production.[Process Date],Production.[CLIP TYPE] AS ClipType, Sum(Production.[NO OF CLIPS]) AS ClipsUsed
FROM (SELECT [Process Date],Production.[CLIP TYPE], Production.[NO OF CLIPS]
FROM Production
where Isnumeric(Production.[NO OF CLIPS]) and Production.[Process Date] = #4/6/20#
)
GROUP BY Production.[Process Date],Production.[CLIP TYPE];
I get this result
Process Date |
ClipType |
ClipsUsed |
06-Apr-20 |
A |
36 |
06-Apr-20 |
A+Screw |
198 |
06-Apr-20 |
B |
42 |
06-Apr-20 |
C |
291 |
06-Apr-20 |
D |
330 |
06-Apr-20 |
F |
54 |
06-Apr-20 |
G |
70 |
06-Apr-20 |
H |
52 |
06-Apr-20 |
I |
65 |
06-Apr-20 |
J |
32 |
06-Apr-20 |
K |
27 |
06-Apr-20 |
L |
44 |
06-Apr-20 |
METAL |
66 |
06-Apr-20 |
N |
33 |
06-Apr-20 |
O |
76 |
But notice that I had to supply a specific date. When i tried to use a parameter, [Enter Date] and supplied 4/6/20 I got no results???
I did a summary of Clips used between 4 Apr and 9 Apr using this query
Code:
SELECT Production.[CLIP TYPE] AS ClipType, Sum(Production.[NO OF CLIPS]) AS ClipsUsed
FROM (SELECT [Process Date],Production.[CLIP TYPE], Production.[NO OF CLIPS]
FROM Production
where Isnumeric(Production.[NO OF CLIPS]) and Production.[Process Date] between #4/6/20# and # 4/9/20#
)
GROUP BY Production.[CLIP TYPE];
and got this result
ClipType |
ClipsUsed |
A |
82 |
A+Screw |
379 |
B |
84 |
C |
820 |
D |
922 |
F |
380 |
G |
152 |
H |
92 |
I |
128 |
J |
80 |
K |
62 |
L |
94 |
METAL |
90 |
N |
63 |
O |
158 |
Your tables are not normalized. This will become an issue at some time and will cause you to create workarounds.
Names with embedded spaces will also lead to syntax errors - correctable, but better to avoid them.
I don't know enough of your environment or requirement to offer more.
I recommend you review your requirements and start by Normalizing your tables. They are the base of a successful database.
Hope this helps.
Good luck.