I have a Dlookup in a sub that isn?t working. The sub?s purpose is to add a new value to a list in a combobox. When the user enters a new value, a data entry form pops up and they can add the new value plus some other fields pertaining to the new record. The user then clicks the save button in the popup form, and then the close button. At that point an error message comes up saying ?You have cancelled the previous operation.? When I hit the debug button, the Dlookup line of code is highlighted:
Result = DLookup("[Agent]", "tblAgent", "[Agent] = " & NewData)
Does anyone know what is wrong with the line (I'm working with Access 2002)?
Thanks in advance!
Result = DLookup("[Agent]", "tblAgent", "[Agent] = " & NewData)
Does anyone know what is wrong with the line (I'm working with Access 2002)?
Thanks in advance!