AfterUpdate Problems

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

From: Don (someone_at_somewhere.net)
Date: 03/27/05


Date: Sun, 27 Mar 2005 10:33:01 -0500

I have a relatively simple form which uses unbound text boxes to display and
edit information. When the form opens, an ADO Recordset is created. On the
form are record navigation buttons to move forward and backward by
performing MoveNext and MovePrevious respectively. The text boxes use
AfterUpdate to post the changes to the recordset by assigning the textbox
value to the recordset field (rstMyRecordset!Remarks = txtRemarks) followed
by a recordset update (rstMyRecordset.Update).

The problem I am having is if I edit the remarks of the first record, then
move to the next and try editing the remarks on the second record. As soon
as I enter a character, a pop-up appears saying:

The data has changed.
Another user editied this record and saved the changes before you attempted
to save your changes.
Re-edit the record.

I hit okay and everything works okay. Interestingly, this only seems to
happen when going from the first record to the second record and not others.
Also it does not happen when editing the second record and going back and
editing the first record.

Am I misguided in simply using AfterUpdate to post the changes to the
recordset? Should there be something in the form's record navigation
events?

Any advice will be greatly appreciated!

Thanks!

Don

"nvolved editing text in a "Remarks" text box (underlying field is a Memo
type).



Relevant Pages

  • Re: AfterUpdate Problems
    ... > move to the next and try editing the remarks on the second record. ... > I hit okay and everything works okay. ...
    (microsoft.public.access.formscoding)
  • Re: Edit text in box
    ... Editing them by right-clicking & choosing Edit Picture most likely produced ... That would produce the collection of editable text boxes. ... Even with Track Changes turned on the editing ... I have the option to "Protect Document" - so the ...
    (microsoft.public.word.docmanagement)
  • Re: combine events to create a condition
    ... adding a record and editing a current record. ... There are some text boxes and combo boxes. ... LostFocus?) ... HTH - RuralGuy acXP WinXP Pro ...
    (microsoft.public.access.formscoding)
  • Re: TS 2k3 - client settings tab, all options greyed out???
    ... out boxes by editing the group policy, even though the options in the ... admin rights in the domain, they get a login screen and can enter their ...
    (microsoft.public.win2000.termserv.clients)
  • Make Combo Box ReadOnly?
    ... I have a number of controls on a tab and they display data but I want to ... prevent the user from editing them. ... I set the ReadOnly property ... of the text boxes to true which displays the data in a dark font on a gray ...
    (microsoft.public.dotnet.languages.vb.controls)