Instead of nine distinct fields (or a repeating field with 9 repetitions), I recommend that you set up a related table where each time that you scan a barcode, the system can log the barcode scanned and update a "time in" or "time out" field to log the student's entry or exit to/from the LIbrary.
Does your scanner function in Keyboard emulation mode? (If you are hooking up a USB cable to connect it to a computer, answer are nearly 100% that this is the case.)
Can the scanner be configured to put special characters before and after the scanned data from the ID badge? (nearly all can).
If so, you can fully automate the scanning process with script triggers. One trigger tripped by the beginning of the scan can put the cursor in the correct field. A trigger tripped at the end of the scan can then use the data input from the scanner to find the record for that student and log them in or out, creating a new record to log them in or out as needed.
The reason for separate records for each entry/exit pairing is that it then becomes much easier to pull up reports of your library activity as well as a list of how many students are currently in the library.