PC Review


Reply
Thread Tools Rate Thread

AfterUpdate unreliable?

 
 
=?Utf-8?B?TmluaWVs?=
Guest
Posts: n/a
 
      2nd Nov 2006
Hello,

I use the AfterUpdate event to copy text from an unbound textbox to a bound,
hidden textbox, which, presumably, will lead to an immediate update of the
query and therefore the table.
However, I have noticed that the update is not immediate, nor is it even
guaranteed.
I've been testing this by changing the value in my text box, then tabbing
out, and then going back to another record.
I would have thought that the act of tabbing out of the textbox after the
content was changed would fire the AfterUpdate event, but when I check the
table, there's no change in the text field.

So I'm wondering - is the AfterUpdate event the wrong event to use? If so,
which one would be better? On Dirty? Or does that only work when entering
something into a blank text box?
I find this rather puzzling because I'm using the same method elswhere on my
form, and there it appears to be working.

Any idea?

Thank you.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TmluaWVs?=
Guest
Posts: n/a
 
      2nd Nov 2006
Update - Only when I edit existing text does this seem to happen. When I
clear the textbox/field first - by copying Null to it - and then write new
text, it is working.
 
Reply With Quote
 
=?Utf-8?B?TmluaWVs?=
Guest
Posts: n/a
 
      2nd Nov 2006
It's no the event, it's my method of moving the data...

Me!sfrmBrowsePromotion![Note] = Me.NoteText6

Isn't working so well, I also saw text put into the wrong record.
I guess I better go back to using an update query.

DoCmd.SetWarnings (False)
DoCmd.RunSQL "Update qryBrowsePromotion Set [Note] =
Forms!frmBrowseApplications.[NoteText6] WHERE [ActivityID] =
Forms!frmBrowseApplications.[ActivityID] And [QuestionID] = 96"
DoCmd.SetWarnings (True)

 
Reply With Quote
 
=?Utf-8?B?TmluaWVs?=
Guest
Posts: n/a
 
      2nd Nov 2006
Very strange though, because using this method to clear the text field does
work:

Me.Note.Value = Null
 
Reply With Quote
 
red6000
Guest
Posts: n/a
 
      2nd Nov 2006
Don't you need to use the REQUERY code to re-update a field which has
already been populated.

"Niniel" <(E-Mail Removed)> wrote in message
news:BB6BF67C-2B64-42A6-8A25-(E-Mail Removed)...
> Very strange though, because using this method to clear the text field
> does
> work:
>
> Me.Note.Value = Null



 
Reply With Quote
 
David W. Fenton
Guest
Posts: n/a
 
      3rd Nov 2006
"red6000" <(E-Mail Removed)> wrote in
news:454a42b5$0$8487$(E-Mail Removed):

> Don't you need to use the REQUERY code to re-update a field which
> has already been populated.


Requery re-retrieves the entire recordset. Refresh will update
values in existing records in your recordset that have been changed
by other users/processes.

If you want to see records added by other users or processed, you
have to requery. For seeing up-to-date values, all that's needed is
Refresh.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: USB sticks unreliable SteveH DIY PC 0 21st May 2008 05:29 PM
USB - unreliable? msnews.microsoft.com Windows XP Hardware 7 18th Sep 2007 05:19 PM
MSN Unreliable? KGB-911 Windows XP 19 10th Feb 2005 05:07 PM
Why so unreliable Michael Tissington Windows XP Messenger 6 8th Nov 2004 02:02 PM
Is AMD Unreliable? RayOfLight DIY PC 38 27th Jul 2003 07:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:46 AM.