G
Guest
I am having a problem with the following query
SELECT progress.[progress id], progress.[award id], progress.status,
progress.[candidate ID], progress.[start date], progress.assessor,
progress.IV, progress.comments, progress.award, progress.[units completed],
IIf([award]="CARE 2",DateAdd("m",12,[start date]),IIf([award]="care 3" Or
[award]="management 3",DateAdd("m",18,[start date]),IIf([award]="care 4" Or
[award]="management 4",DateAdd("m",24,[start date]),""))) AS [expected
completion], employeeinfo.surname, employeeinfo.forename,
employeeinfo.Project, progress.[completed date]
FROM employeeinfo INNER JOIN progress ON employeeinfo.[employee ID] =
progress.[employee id]
WHERE (((progress.[start date]) Between [date of last EV visit] And [date of
next EV visit]))
ORDER BY IIf([award]="CARE 2",DateAdd("m",12,[start date]),IIf([award]="care
3" Or [award]="management 3",DateAdd("m",18,[start date]),IIf([award]="care
4" Or [award]="management 4",DateAdd("m",24,[start date]),"")));
Firstly, when I try to run it as a query, I get the message that it is typed
incorrectly or may be too complex. However, if I open the report based on
this query, I get no such message.
Next, It is now not doing the expected completion calculation (it did before
I started playing with the query!)
The reason I was changing the query in the first place was so I could change
the parameters to filter the expected date field instead of the start date. I
put CVdate in front of the calculated field, but then lost the plot and
cannot return to a working query!
Can anyone help.
SELECT progress.[progress id], progress.[award id], progress.status,
progress.[candidate ID], progress.[start date], progress.assessor,
progress.IV, progress.comments, progress.award, progress.[units completed],
IIf([award]="CARE 2",DateAdd("m",12,[start date]),IIf([award]="care 3" Or
[award]="management 3",DateAdd("m",18,[start date]),IIf([award]="care 4" Or
[award]="management 4",DateAdd("m",24,[start date]),""))) AS [expected
completion], employeeinfo.surname, employeeinfo.forename,
employeeinfo.Project, progress.[completed date]
FROM employeeinfo INNER JOIN progress ON employeeinfo.[employee ID] =
progress.[employee id]
WHERE (((progress.[start date]) Between [date of last EV visit] And [date of
next EV visit]))
ORDER BY IIf([award]="CARE 2",DateAdd("m",12,[start date]),IIf([award]="care
3" Or [award]="management 3",DateAdd("m",18,[start date]),IIf([award]="care
4" Or [award]="management 4",DateAdd("m",24,[start date]),"")));
Firstly, when I try to run it as a query, I get the message that it is typed
incorrectly or may be too complex. However, if I open the report based on
this query, I get no such message.
Next, It is now not doing the expected completion calculation (it did before
I started playing with the query!)
The reason I was changing the query in the first place was so I could change
the parameters to filter the expected date field instead of the start date. I
put CVdate in front of the calculated field, but then lost the plot and
cannot return to a working query!
Can anyone help.