error 2118

  • Thread starter Thread starter Johan
  • Start date Start date
J

Johan

hello,

On a form, I have a listbox 'lstLanguages' filled with languages. Its
rowsource is a query that gets languages out of table 'tblLanguages'.
Users can add a language. If they try to add one which is not in the
listbox, the NotInList-event occurs. With Visual Basic, the new language
(NewData) is added to table 'tblLanguages'. Than, I perform a requery on
the listbox 'lstLanguages' (Me.lstLanguages.Requery). But than I get error
message 2118 : "The action Requery can only be performed after you have
saved the present field". Why do I have to save this field. In
'tblLanguages' all necessary changes have been made and this is where
'lstLanguages' gets its information.

Can anybody help me to solve this problem?

Thanks, Johan
 
Is the listbox bound to a field in the form's RecordSource? If yes, you've
dirtied the form when the user enters a language that isn't in the list, and
ACCESS wants to save it before it requeries the list box (as that will cause
ACCESS to move away from the choice).

Are you setting Response equal to acDataErrContinue in your NotInList code?
 
Back
Top