i am creating a library database and i need to prevent the same book being on loan more than once. i have a books table, a loan table an instance of book table, and a student table all with the appropriate links.
i have created a query that selects records where there is a value in the "Date Borrowed" field and no value in the "Date Returned" field of the loan table.
now i need to create a macro that will run the query and then display a message (eg. "book already on loan") if the query finds that that book is already on loan. if the book isn't on loan the record needs to be added to the loan table. this macro will be run when a command button on the loan form is pressed.
if anyone could help that would be great.