L
Leslie Isaacs
Hello All
I have the following query, which works OK in that it does give the correct
output, BUT when I initially run it I am asked for the parameter [Annual WTE
salary]. But this value is calculated, correctly, as another field in the
query. If I just hit the enter key the query runs, and the correct output is
generated: but why is it asking me to enter a value for [Annual WTE salary]?
Hope someone can help
Many thanks
Leslie Isaacs
The query:
SELECT Sum([x confirmed].[hourly rate]*[wte]/7*365/12) AS [Annual WTE
salary], [x confirmed].name, staffs.practice, months.year, months.[ha year],
staffs.[nhsp ees rate], IIf([nhsp ees rate]=0.05,0.05,IIf([Annual WTE
salary]>100000,0.085,IIf([Annual WTE salary]>63417,0.075,IIf([Annual WTE
salary]>19165,0.065,0.05)))) AS Expr1
FROM months INNER JOIN (staffs INNER JOIN [x confirmed] ON staffs.name = [x
confirmed].name) ON months.[month name] = [x confirmed].[month name]
WHERE ((([x confirmed].practice)=[Forms]![frm x main]![prac name]))
GROUP BY [x confirmed].name, staffs.practice, months.year, months.[ha year],
staffs.[nhsp ees rate], IIf([nhsp ees rate]=0.05,0.05,IIf([Annual WTE
salary]>100000,0.085,IIf([Annual WTE salary]>63417,0.075,IIf([Annual WTE
salary]>19165,0.065,0.05))))
HAVING (((months.year)=[Forms]![frm x main]![year]));
I have the following query, which works OK in that it does give the correct
output, BUT when I initially run it I am asked for the parameter [Annual WTE
salary]. But this value is calculated, correctly, as another field in the
query. If I just hit the enter key the query runs, and the correct output is
generated: but why is it asking me to enter a value for [Annual WTE salary]?
Hope someone can help
Many thanks
Leslie Isaacs
The query:
SELECT Sum([x confirmed].[hourly rate]*[wte]/7*365/12) AS [Annual WTE
salary], [x confirmed].name, staffs.practice, months.year, months.[ha year],
staffs.[nhsp ees rate], IIf([nhsp ees rate]=0.05,0.05,IIf([Annual WTE
salary]>100000,0.085,IIf([Annual WTE salary]>63417,0.075,IIf([Annual WTE
salary]>19165,0.065,0.05)))) AS Expr1
FROM months INNER JOIN (staffs INNER JOIN [x confirmed] ON staffs.name = [x
confirmed].name) ON months.[month name] = [x confirmed].[month name]
WHERE ((([x confirmed].practice)=[Forms]![frm x main]![prac name]))
GROUP BY [x confirmed].name, staffs.practice, months.year, months.[ha year],
staffs.[nhsp ees rate], IIf([nhsp ees rate]=0.05,0.05,IIf([Annual WTE
salary]>100000,0.085,IIf([Annual WTE salary]>63417,0.075,IIf([Annual WTE
salary]>19165,0.065,0.05))))
HAVING (((months.year)=[Forms]![frm x main]![year]));