D B Lawson
10-04-2001, 09:17 AM
I have a table which holds information on the status of a job. As the job travels through it's various stages, the user up dates the status accordingly. I want a report which shows the current status of a job. I thought it was working using a query with the following SQL:
SELECT tblJobStatus.JSJobNo, Last(tblJobStatus.JSIDNo) AS LastOfJSIDNo
FROM tblJobStatus
GROUP BY tblJobStatus.JSJobNo
ORDER BY tblJobStatus.JSJobNo;
But it's not correct. It's showing status number three out of the nine steps recorded at the present. If I change it from last of to Max, the report shows me, what appears to be, the current status of each job, ie, step 9, but now I'm worried if the user makes more changes to the status, it won't update again.
Can anybody explain why the Last of isn't updating and will Max work instead?
Thanks.
DBL
SELECT tblJobStatus.JSJobNo, Last(tblJobStatus.JSIDNo) AS LastOfJSIDNo
FROM tblJobStatus
GROUP BY tblJobStatus.JSJobNo
ORDER BY tblJobStatus.JSJobNo;
But it's not correct. It's showing status number three out of the nine steps recorded at the present. If I change it from last of to Max, the report shows me, what appears to be, the current status of each job, ie, step 9, but now I'm worried if the user makes more changes to the status, it won't update again.
Can anybody explain why the Last of isn't updating and will Max work instead?
Thanks.
DBL