Hi all,
I've got the following query (It's probably easier to copy to Access to view) which is attemping to take the names from the "People" table and whether they have booked in or out etc on the Register table.
The bit I'm confused with, is how do I only pull the latest record from the Register table?? This is an issue I've been working on for sometime in various guises, but I can't seem to work out the last little bit. Max or Last functions on the field don't seem to be working.
Thanks for your time,
Regards,
Fitz
Fitz
Did you know, there are 10 types of people in this world:
* Those who understand binary
and
* Those who Don't!!
I've got the following query (It's probably easier to copy to Access to view) which is attemping to take the names from the "People" table and whether they have booked in or out etc on the Register table.
Code:
SELECT tblPeople.PEO_ID, [PEO_FORENAME] & " " & Trim([PEO_SURNAME] & " " & [PEO_SUFFIX]) AS [Full Name], tblRegister.REG_STATUS AS Status, tblRegister.REG_OTHER_INFO AS [Other Info], Last(tblRegister.REG_LAST_MOD) AS LastOfREG_LAST_MOD
FROM tblPeople INNER JOIN tblRegister ON tblPeople.PEO_ID = tblRegister.REG_PEO_ID
WHERE (((tblRegister.REG_DATE)=Format([Forms]![frmBookInOut]![txtDate],"DD-MMM-YYYY")))
GROUP BY tblPeople.PEO_ID, [PEO_FORENAME] & " " & Trim([PEO_SURNAME] & " " & [PEO_SUFFIX]), tblRegister.REG_STATUS, tblRegister.REG_OTHER_INFO, tblPeople.PEO_SURNAME, tblPeople.PEO_FORENAME
ORDER BY tblPeople.PEO_SURNAME, tblPeople.PEO_FORENAME;
The bit I'm confused with, is how do I only pull the latest record from the Register table?? This is an issue I've been working on for sometime in various guises, but I can't seem to work out the last little bit. Max or Last functions on the field don't seem to be working.
Thanks for your time,
Regards,
Fitz
Fitz
Did you know, there are 10 types of people in this world:
* Those who understand binary
and
* Those who Don't!!