error 2118

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
 
K

Ken Snell

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top