"Run-time error '2118':
You must save the current field before you run the Requery action."
I have two forms. Form A is opened. It has a multiselect listbox with some data. With 1 row selected (0 or more than 1 will keep user from opening Form B), the user can open Form B, which is modal.
In Form B, the user selects a record to add to the listbox in Form A. This record is inserted after the selected row by programmatically updating the underlying data and then running the .Requery method of the listbox. The selected row is set to not selected. The .ListIndex is then incremented and the new record selected set to true so that the newly added record now behaves as the 1 selected row.
Form B is still open. If the user selects another record to insert, calling the same code, the data will be programmatically, but the call to .Requery results in the error above.
I have found very little information about this error anywhere on the web. All help is appreciated.