whiteboy
New member
- Local time
- Tomorrow, 03:25
- Joined
- Sep 12, 2020
- Messages
- 3
I need to know,Is it possible to use DLookup with And condition?
Because I tried folowing vba code in my Access database which gave me a Data Type Mismatch Error.The code used myself is as follows;
Dim EMP As Long
'EMP = DLookup("[ID]", "tbl_Test", "[ID] = '" & Me.txtEmpNo & "' And EMPNAME = " & Me.txtName)
End Sub
My requirement is to check duplicate records in two fields of single table.
Because I tried folowing vba code in my Access database which gave me a Data Type Mismatch Error.The code used myself is as follows;
Dim EMP As Long
'EMP = DLookup("[ID]", "tbl_Test", "[ID] = '" & Me.txtEmpNo & "' And EMPNAME = " & Me.txtName)
End Sub
My requirement is to check duplicate records in two fields of single table.