J
jkendrick75
when i run the query as a query, i get the correct answers. however when i
try to open the report that runs off of the query, i am getting an error
"This expression is typed incorrectly, or it is too complex to be evaluated.
for example, a numeric expression may contain too many complicated elements.
Try simplifying the expression by assigning parts of the expression to
variables."
this report used to work, before i deleted a table, and added a different
table to the database. both tables had the same data, just one had several
other fields that were not necessary. the one that i'm using now just has
two fields. Using the one with the two fields was much easier to normalize,
as it had some duplicate values. When i ran the report, instead of showing
19 records like it should have, it was showing 28 records due to all of the
duplication of data in the three tables that the query works off of.
now some of the spaces, when ran as a query, are blank. i have set it up in
the report to automatically fill blanks with 1's, so as to not get other
display areas to show "DIV0#" or something like that.
The sql for the query is below:
---------------------------------------------------------------------------
SELECT tblDefectCount.Operator, tblDefectCount.Comments,
tblDefectCount.Code, tblDefectCount.PressNumber, tblDefectCount.MoldNumber,
tblDefectCount.ActualOps, tblDefectCount.UpTime, tblDefectCount.CycleTime,
tblDefectCount.ActualCavities, DBA_part_machine1.crew_size,
DBA_part_machine1.cycle_time, DBA_part_machine1.parts_per_cycle,
tblDefectCount.TotalPartsRan, tblDefectCount.TotalDefects,
tblDefectCount.DownTime
FROM (tblDefectCount LEFT JOIN DBA_part_customer1 ON
tblDefectCount.PartNumber = DBA_part_customer1.customer_part) LEFT JOIN
DBA_part_machine1 ON DBA_part_customer1.part = DBA_part_machine1.part
WHERE
(((tblDefectCount.WorkDate)=[forms]![frmDailyProductionReport].[txtDate]) AND
((tblDefectCount.Shift)=[forms]![frmDailyProductionReport].[txtShift]) AND
((tblDefectCount.Plant)=[forms]![frmdailyproductionReport].[txtPlant]))
GROUP BY tblDefectCount.Operator, tblDefectCount.Comments,
tblDefectCount.Code, tblDefectCount.PressNumber, tblDefectCount.MoldNumber,
tblDefectCount.ActualOps, tblDefectCount.UpTime, tblDefectCount.CycleTime,
tblDefectCount.ActualCavities, DBA_part_machine1.crew_size,
DBA_part_machine1.cycle_time, DBA_part_machine1.parts_per_cycle,
tblDefectCount.TotalPartsRan, tblDefectCount.TotalDefects,
tblDefectCount.DownTime;
try to open the report that runs off of the query, i am getting an error
"This expression is typed incorrectly, or it is too complex to be evaluated.
for example, a numeric expression may contain too many complicated elements.
Try simplifying the expression by assigning parts of the expression to
variables."
this report used to work, before i deleted a table, and added a different
table to the database. both tables had the same data, just one had several
other fields that were not necessary. the one that i'm using now just has
two fields. Using the one with the two fields was much easier to normalize,
as it had some duplicate values. When i ran the report, instead of showing
19 records like it should have, it was showing 28 records due to all of the
duplication of data in the three tables that the query works off of.
now some of the spaces, when ran as a query, are blank. i have set it up in
the report to automatically fill blanks with 1's, so as to not get other
display areas to show "DIV0#" or something like that.
The sql for the query is below:
---------------------------------------------------------------------------
SELECT tblDefectCount.Operator, tblDefectCount.Comments,
tblDefectCount.Code, tblDefectCount.PressNumber, tblDefectCount.MoldNumber,
tblDefectCount.ActualOps, tblDefectCount.UpTime, tblDefectCount.CycleTime,
tblDefectCount.ActualCavities, DBA_part_machine1.crew_size,
DBA_part_machine1.cycle_time, DBA_part_machine1.parts_per_cycle,
tblDefectCount.TotalPartsRan, tblDefectCount.TotalDefects,
tblDefectCount.DownTime
FROM (tblDefectCount LEFT JOIN DBA_part_customer1 ON
tblDefectCount.PartNumber = DBA_part_customer1.customer_part) LEFT JOIN
DBA_part_machine1 ON DBA_part_customer1.part = DBA_part_machine1.part
WHERE
(((tblDefectCount.WorkDate)=[forms]![frmDailyProductionReport].[txtDate]) AND
((tblDefectCount.Shift)=[forms]![frmDailyProductionReport].[txtShift]) AND
((tblDefectCount.Plant)=[forms]![frmdailyproductionReport].[txtPlant]))
GROUP BY tblDefectCount.Operator, tblDefectCount.Comments,
tblDefectCount.Code, tblDefectCount.PressNumber, tblDefectCount.MoldNumber,
tblDefectCount.ActualOps, tblDefectCount.UpTime, tblDefectCount.CycleTime,
tblDefectCount.ActualCavities, DBA_part_machine1.crew_size,
DBA_part_machine1.cycle_time, DBA_part_machine1.parts_per_cycle,
tblDefectCount.TotalPartsRan, tblDefectCount.TotalDefects,
tblDefectCount.DownTime;