All right, here is my problem. I willl appreciate any help. Pardon me for my grammatical errors. English is no my first language.
So, problem is in constructing of one Query in Access database. I create database for borrowing something like books.
I have a table named evidencija where are recorded all actions. That table looks like this:
See IMG01 in ZIP attachment.
ID is auto-number(primary key of this table). Field Područje is relatively connected field from another table. Područje are something like books that should be borrowed. Prezime is also relatively connected field from another table. Prezime on english means "second name, surname". This represents all members who can borrow books. So, this table record all state changes. Datum posudbe and Datum povrata are date of take/date of return of book.
But, what I need?
I want to make a request that will put out all the books that have been restored! BUT, i don't want that book that has been borrowed twice (ex. Book 10)come twice in result (ID17& ID18). I want that Query show me only last change (only ID18). ID17 should not come out because there is recent record for this book borrowing. Also, books that are not returned should not apear in result of query.
So, final result of query should look like this:
See, IMG02 in ZIP attachment.
Explanation: IDs: 17, 19, 21 and 24 should not apear because there are recent record of this borrowings. ID20 should not apear because this book has no date of return (it's not returned yet).
Has anyone an idea how to do this? If you need any more informations, feel free to ask. I tried to explain best I can on english.
Tnq very much!

So, problem is in constructing of one Query in Access database. I create database for borrowing something like books.
I have a table named evidencija where are recorded all actions. That table looks like this:
See IMG01 in ZIP attachment.
ID is auto-number(primary key of this table). Field Područje is relatively connected field from another table. Područje are something like books that should be borrowed. Prezime is also relatively connected field from another table. Prezime on english means "second name, surname". This represents all members who can borrow books. So, this table record all state changes. Datum posudbe and Datum povrata are date of take/date of return of book.
But, what I need?
I want to make a request that will put out all the books that have been restored! BUT, i don't want that book that has been borrowed twice (ex. Book 10)come twice in result (ID17& ID18). I want that Query show me only last change (only ID18). ID17 should not come out because there is recent record for this book borrowing. Also, books that are not returned should not apear in result of query.
So, final result of query should look like this:
See, IMG02 in ZIP attachment.
Explanation: IDs: 17, 19, 21 and 24 should not apear because there are recent record of this borrowings. ID20 should not apear because this book has no date of return (it's not returned yet).
Has anyone an idea how to do this? If you need any more informations, feel free to ask. I tried to explain best I can on english.
Tnq very much!