It is not working. can anyone help me. Thx
If (IsNull(DLookup("[ReceiptNo]", _
"ReceiptBooks", "[StartingNo]" And " [Endingno] ='" _
& Me!ReceiptNo & "'"))) Then
MsgBox "fgdgfdgfd", vbRetryCancel, "ReceiptBook Issued"
Cancel = True
End If
It is not working. can anyone help me. Thx
If (IsNull(DLookup("[ReceiptNo]", _
"ReceiptBooks", "[StartingNo]" And " [Endingno] ='" _
& Me!ReceiptNo & "'"))) Then
MsgBox "fgdgfdgfd", vbRetryCancel, "ReceiptBook Issued"
Cancel = True
End If
Do the field names include the brackets? If not, remove them. Also, you cant combine your criteria with And the way you did. You have to show StartingNo = something AND EndingNo = something. You cannot do StartingNo And EndingNo = something.