Hey guys. I wrote a massive email with lots of details etc. about my issue just, but I was logged out before it posted and I have lost it all. I'll try to be more concise this time.
I've been left with a database someone else built over two years ago and an issue has recently cropped up. Part of the database involves retrieving the last date in a table and calculating the time from Now() back to that date. This isn't currently working and appears to be stuck at a particular date.
Doing some probing, the database uses a query (called "LP CT Weekly") which searches a table (called "CT Weekly QA") for the last entry in the "Date Performed" column, after sorting by ascending. The SQL code is
SELECT Last([CT Weekly QA].[Date Performed]) AS [CT Weekly]
FROM [CT Weekly QA]
ORDER BY Last([CT Weekly QA].[Date Performed]);
This is similar syntax to other queries which do the same job on different tables. Currently the returned value is 16/02/17 despite three other entries appearing more recently. This issue has been ongoing for three weeks now, with the 16/02/17 being returned every time, so it isn't anything to do with returning one value above the last etc. The query just appears to be ignoring anything more recent than the 16/02/17. This has a unique ID of 162.
The table being called has the "Date Performed" entry as type Date/Time and format Short Date.
I'm at a loss as to why the query has appeared to have maxed out at this date and is ignoring more recent dates. Manually sorting the table by Date Performed: Oldest to Newest has no effect.
Anyone got any clues or directions I should look in? Thank you very much.
I've been left with a database someone else built over two years ago and an issue has recently cropped up. Part of the database involves retrieving the last date in a table and calculating the time from Now() back to that date. This isn't currently working and appears to be stuck at a particular date.
Doing some probing, the database uses a query (called "LP CT Weekly") which searches a table (called "CT Weekly QA") for the last entry in the "Date Performed" column, after sorting by ascending. The SQL code is
SELECT Last([CT Weekly QA].[Date Performed]) AS [CT Weekly]
FROM [CT Weekly QA]
ORDER BY Last([CT Weekly QA].[Date Performed]);
This is similar syntax to other queries which do the same job on different tables. Currently the returned value is 16/02/17 despite three other entries appearing more recently. This issue has been ongoing for three weeks now, with the 16/02/17 being returned every time, so it isn't anything to do with returning one value above the last etc. The query just appears to be ignoring anything more recent than the 16/02/17. This has a unique ID of 162.
The table being called has the "Date Performed" entry as type Date/Time and format Short Date.
I'm at a loss as to why the query has appeared to have maxed out at this date and is ignoring more recent dates. Manually sorting the table by Date Performed: Oldest to Newest has no effect.
Anyone got any clues or directions I should look in? Thank you very much.