Re: Error 2118

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Rob Oldfield (blah_at_blah.com)
Date: 11/22/04


Date: Mon, 22 Nov 2004 02:16:35 -0000

Whatever the problem is, it certainly won't be helped by using a Timer event
to control refreshes. That's just wrong. Try OnCurrent instead. Set row
sources in there and I don't think you'll even need a requery.

"Ben" <Ben@discussions.microsoft.com> wrote in message
news:91CF1CC8-64CD-4C49-A167-ACBB9A87907F@microsoft.com...
> Hi,
>
> I have a form in Access 2003, that is bound to a table. On this form I
have
> a couple of listboxes that are there to just display data. They are not
bound
> controls although their source is an SQL statement that includes the
primary
> key value from the currently displayed record in a WHERE clause. The user
can
> select a row in the listbox to open up another form displaying more
detailed
> information about the data in that row.
>
> I also have a timer event attached to the form, set to 'fire' every two
> seconds to update these two listboxes. The problem I have is that more
often
> than not the requery causes the following error,
>
>
> --------------------------------------------------------------------------
------
> 2118: You must save the current field before you run the Requery
action.
>
> --------------------------------------------------------------------------
------
>
> I've seen suggestions to use code such as 'Me.listbox_name.UNDO' to solve
> the problem but I have tried this and found that the values of other
controls
> on the form are cleared at the same time. I can't save the form either
> because at this point the user might not have enter values in all the
fields
> and therefore the data integrity checking would kick in.
>
> If anyone has any other suggestions I'd be most grateful!
>
> Thanks in advance,
> Ben



Relevant Pages

  • Re: Storage of html markup code in database
    ... UIs may include reports and database management tools, ... The details of your desired HTML-encoding may change over time. ... may also differ between display locations within your application. ... While it's unfortunate that the built-in controls are not ...
    (microsoft.public.dotnet.security)
  • RE: Display a record - several questions
    ... ObjectDataSource set up to get the correct record on a select. ... sub controls in the certain tepmlate and modify them. ... How do I display a RadioButtonList and CheckBox value where it is ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Kneisner and Doering KWZ30-2
    ... The controls of the KWZ-30/2 are much more comfortable than the controls of ... colour display with a resolution of 320 x 240 pixels. ... passed though a low pass filter, a switchable high pass filter and an ... mixers are followed by two A/D-converters with a dynamic range of 120 dB. ...
    (rec.radio.shortwave)
  • Re: Is it a habit we prefer mechnical instruments?
    ... Converting the display to a form fit for human consumption ... graphics on standard PC using C++, and you can see the difference. ... simulator that is rendered by a digital display showing analog ... controls are rendered digitally. ...
    (rec.aviation.homebuilt)
  • Re: Splash screen
    ... > comes up as a whole the first time its displayed... ... > graphics buffer is then quickly written to displayed surface memory. ... rather it's the standard way the controls behave ... >>>> display the form when everything is ready and the form can be ...
    (microsoft.public.dotnet.framework.windowsforms)