A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

error 2118



 
 
Thread Tools Display Modes
  #1  
Old July 5th, 2004, 11:33 PM
Johan
external usenet poster
 
Posts: n/a
Default 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  
Old July 5th, 2004, 11:50 PM
Ken Snell
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:19 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.