Hi,
The error handler works.
As for the DCount, I have this which has a problem:
Code:
If DCount("*", "tblBorrowedBooks", "fkBookId = " & Me.txtfkBookId _ & " AND fkMemberId = " & Me.cboMember _
& " AND DateBorrowed=#" & Me.txtDateBorrowed & "#" _
& " AND DateReturned=#" & Me.txtDateReturned & "#") > 0 Then
MsgBox "A book matching these details already exist!", vbExclamation, "Library Program"
Even when I used one field "fkBookId" instead of "*" still stoppes the compile at .txtDateBorrowed in (Me.txtDateBorrowed) the third line of the code.
any suggestions
Khalil