i have created a library datatbase and i need to come up with a way of stopping the same book being lent out twice. i have created a select query that selects books that are already on loan. i need to create a macro that stops a loan from taking place if the book number comes up in this query as being out. (the book number will be typed into the loan form when a new loan is being entered)
basically if a book is out the loan cant be processed.
Not sure how your database is set up but when you loan out a book and don't want it to be brought up to be loaned out again what about not letting it be shown again? Or does it have to? If the entry or lookup screen shows all your books, why not have your query to NOT SHOW items that are OUT, such as a check or option box for In and Out, then setting it to show only those that are IN...(Field set for CheckedOut as a CheckBox, in that field in the query criteria section place 0, being Zero meaning NotCheckedOut). If it needs to show but show as None Available then code it to show books out but if it has a LoanDate it gives a message of This selection is currently checked out. Sound like what you're trying to get around to??
basically all books have to be shown in the loan table at all times. when the librarian enters a new loan, she types in the book number into the loan form. i need some way of displaying a message sayying "sorry, book already on loan" if the book is recorded as being on loan in the loans table. (if there is a date present in teh "date borrowed" field but not in the "date returned" field)
i cant use code though because i dont understand it
i need a way of doing this using macros and queries.