This is the code for the select combo box that selects a book to be checked out. After update if the book selected has already been checked out and no date in the returned date field then msgbox this book is already checked out.
Private Sub Combo13_AfterUpdate()
On Error GoTo Combo13_AfterUpdate_Err
DoCmd.SearchForRecord , "", acFirst, "[ID] = " & Str(Nz(Screen.ActiveControl, 0))
Combo13_AfterUpdate_Exit:
Exit Sub
Combo13_AfterUpdate_Err:
MsgBox Error$
Resume Combo13_AfterUpdate_Exit
End Sub
Thanks for your help