If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
error 2118
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 |
#2
|
|||
|
|||
error 2118
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? -- Ken Snell MS ACCESS MVP "Johan" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|