SELECT dbo_job.job_date,
dbo_job.job,
dbo_job.suffix,
dbo_job.item,
qry_SumCost.SumMatlPlan,
qry_SumCost.SumMatlAct,
([qty_released]*[fixovhd_rate])/[pcs_per_lbr_hr] AS lbr_cost_plan,
qry_LaborHours.fixovhd_t_lbr,
[fixovhd_t_lbr]/[qty_complete] AS [FG Actual Price]
FROM qry_SumCost
INNER JOIN (dbo_job
INNER JOIN qry_LaborHours
ON (dbo_job.job = qry_LaborHours.job)
AND (dbo_job.suffix = qry_LaborHours.suffix))
ON (qry_SumCost.job_date = dbo_job.job_date)
AND (qry_SumCost.job = dbo_job.job)
AND (qry_SumCost.suffix = dbo_job.suffix)
GROUP BY dbo_job.job_date,
dbo_job.job,
dbo_job.suffix,
dbo_job.item,
qry_SumCost.SumMatlPlan,
qry_SumCost.SumMatlAct,
([qty_released]*[fixovhd_rate])/[pcs_per_lbr_hr],
qry_LaborHours.fixovhd_t_lbr,
[fixovhd_t_lbr]/[qty_complete]
HAVING (((dbo_job.job_date) Between [Forms]![MainForm]![Text2]
And [Forms]![MainForm]![Text6])
AND ((dbo_job.job) Like "BM0*"
Or (dbo_job.job) Like "WT0*"));
当我删除表达式 [fixovhd_t_lbr]/qty_complete] 时,它可以正常工作,但是当我包含它时,它会给我错误“此表达式输入错误,或者它太复杂而无法评估。例如,数字表达式可能包含太多许多复杂的元素。尝试通过将表达式的一部分分配给变量来简化表达式。我不明白这怎么可能被认为是复杂的。该表达式的两个元素都直接来自两个不同的表,并且本身不是表达式(以防有人想知道)。我很肯定这是由于这个原因,因为通过消除过程我偶然发现这是问题所在。