what is a 2118 error in VBA?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Explain in detail about a 2118 error. I got it when a combo box did not have
a vendor in it's drop down list so an add vendor form was opened so the
vendor could be added. When I got back to the combo box, and execute the
requery, I get the 2118 error which says you must save the current field
before you run the requery action. What's the current field?
 
Set LimitToList to Yes. Use the NotInList event to add items. When you've
added the item using the popup form, close the form to let the code continue
to run in the NotInList event. To tell the combo box that you've added the
item, set Response = acDataErrAdded instead of doing a requery.

When you open the popup form, use the acDialog window mode argument in the
DoCmd.OpenForm call. This will cause the code to pause and wait for you to
close or hide the popup form before continuing.
 
Back
Top