Hi to all,
I have this line of VBA code and is working well.
Code:
Me.txtLoanCount = DCount("*", "tblBorrowedBooks", "[fkBookId] = " & [pkBookId])
I want to add a second criteria for a date field to be null (DateHoldRequest Is Null) using AND operator.
I am not able to do it. Any suggestions please?
I tried this code
Code:
DCount("*", "tblBorrowedBooks", "[fkBookId]='" & [pkBookId] & "' AND [DateHoldRequest] is null")
But had an error: 3464 data type mismatch in criteria expression
Output: 2 AND [DateHoldRequest] is null)
Any ideas?
Khalil