Display most recent record when multiple records for an item exist
Hi,
I have a table which stores a list of all our loan computers and their loan history. Each time a computer is borrowed, a new entry is added to this table, and when it's returned, a checkbox is cleared to show it's no longer in use. Potentially, there could be many entries in this table for the same computer, but only one of these entries could ever have a tick to indicate 'borrowed'.
Now, what I want to be able to do is to generate a query which shows the most recent entry in the table for each computer, from which I can see its loan status. At the moment I'm seeing each entry for each computer. How do I do this?
As a sideline issue, how do I ensure that each computer only has one of its 'loaned?' fields ticked? At the moment there's nothing to stop operator error from issuing it to multiple borrowers.
Thanks!
Greg
Hi,
I have a table which stores a list of all our loan computers and their loan history. Each time a computer is borrowed, a new entry is added to this table, and when it's returned, a checkbox is cleared to show it's no longer in use. Potentially, there could be many entries in this table for the same computer, but only one of these entries could ever have a tick to indicate 'borrowed'.
Now, what I want to be able to do is to generate a query which shows the most recent entry in the table for each computer, from which I can see its loan status. At the moment I'm seeing each entry for each computer. How do I do this?
As a sideline issue, how do I ensure that each computer only has one of its 'loaned?' fields ticked? At the moment there's nothing to stop operator error from issuing it to multiple borrowers.
Thanks!
Greg
Last edited: