J
Jim L
I've designed a library database for my church. We will be scanning in a
patron barcode and a book barcode.
When people return books they will scan in the book and their library
card. I want to use VBA code with the onClick peoperties of a button to
locate a record matching the bookID field and the Patron field and a
blank returndate field, then update the return date.
It starts out ok:
BookScan = InputBox("Scan in the bar code on the book you are Returning:")
PatronScan = InputBox("Scan in your Library ID tag")
Here's where I'm stuck...
I'm not sure how tell Access to search for the record and update the
date field. The query below works, but I don't know how to convert it
into VBA.
UPDATE tblLoan SET tblLoan.ReturnDate = Date()
WHERE (((tblLoan.ReturnDate) Is Null) AND ((tblLoan.DeweyID)=[Enter book
ID]) AND ((tblLoan.PersonID)=[Enter Donor ID]));
If the answer is obvious to you, please clue me in. Thanks in advance!
Jim L
patron barcode and a book barcode.
When people return books they will scan in the book and their library
card. I want to use VBA code with the onClick peoperties of a button to
locate a record matching the bookID field and the Patron field and a
blank returndate field, then update the return date.
It starts out ok:
BookScan = InputBox("Scan in the bar code on the book you are Returning:")
PatronScan = InputBox("Scan in your Library ID tag")
Here's where I'm stuck...
I'm not sure how tell Access to search for the record and update the
date field. The query below works, but I don't know how to convert it
into VBA.
UPDATE tblLoan SET tblLoan.ReturnDate = Date()
WHERE (((tblLoan.ReturnDate) Is Null) AND ((tblLoan.DeweyID)=[Enter book
ID]) AND ((tblLoan.PersonID)=[Enter Donor ID]));
If the answer is obvious to you, please clue me in. Thanks in advance!
Jim L