I am having trouble getting Dlookup to run. I have used it in the past without any problems but in this database I keep getting a runtime error 2001 You Canceled the Previous Operation. The code I'm using is
ME![ECN] = DLookup("[ECNNBR]", "tbl MFDI", "[Part Number] = Forms![ABM KB SETUP SHEET]![PART #]")
I am trying to use this Event Procedure at the Lost Focus on [ABM KB SETUP SHEET]![PART #] and [ECNNBR] is a field in the table tbl MFDI. Anybody got any idea's what is wrong. I do not have any missing references and the references I have selected are Microsoft DAO 3.6 Object Library, Microsoft ActiveX Data Object 2.5 Library, OLE Automation, Visual Basic for Application and Microsoft Access 11.0 Object Library. Should I have anything else selected?
ME![ECN] = DLookup("[ECNNBR]", "tbl MFDI", "[Part Number] = Forms![ABM KB SETUP SHEET]![PART #]")
I am trying to use this Event Procedure at the Lost Focus on [ABM KB SETUP SHEET]![PART #] and [ECNNBR] is a field in the table tbl MFDI. Anybody got any idea's what is wrong. I do not have any missing references and the references I have selected are Microsoft DAO 3.6 Object Library, Microsoft ActiveX Data Object 2.5 Library, OLE Automation, Visual Basic for Application and Microsoft Access 11.0 Object Library. Should I have anything else selected?