Re: Updating form using Query
- From: "Michel Walsh" <vanderghast@VirusAreFunnierThanSpam>
- Date: Tue, 1 Aug 2006 17:49:25 -0400
Hi,
SELECT bookID, CheckOutDate, CheckInDate
FROM checks
WHERE bookID=[ which book you look for:]
AND CheckOutDate = (SELECT MAX(CheckOutDate)
FROM checks
WHERE bookID=[ which book you look
for:] )
and if CheckInDate is NULL, that means the book has not been returned (or
returned and not entered in the db).
Hoping it may help,
Vanderghast, Access MVP
"Sarah" <Sarah@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4B658646-43E3-4FDD-894C-F4CD98E3BA27@xxxxxxxxxxxxxxxx
I am not sure if this is the correct place to put this question. I am
creating a library application. When someone checks out a book, I want to
check the database first to see if that book is in or out. I have the book
num as a text box and the in/out is in a table. Is there any way to have a
query return something in the VBA so that I can do a if ... then clause. I
normally run queries using DoCmd.openquery but it won't work in this case.
Thanks.
--
Sarah
.
- Prev by Date: Re: Running a Query that Allows you to enter the dates that you wa
- Next by Date: Re: Results from a parameter query
- Previous by thread: Re: Nested selects
- Next by thread: Re: time expression
- Index(es):
Relevant Pages
|