469,934 Members | 1,829 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

Is my use of the AfterUpdate and Current Events dangerous?

Hi

I have a form bound to a stored procedure. I have made it that on changing the value of a list box the form moves forward a record.

I have done this using the afterupdate event of the list box. Initially the listbox was bound, but i noticed that when i automatically moved forward the listbox got out of sync with the record source. I got round this by making the list box control unbound and using vba to keep it in sync with the record source as follows:

-In the On Current i update the listbox to the current value of the field.
-In the after Update event for the listbox it sets the field to the value of the listbox, then sets the list box value to null, then calls the docmd goto acnext command.

This seems to work great. I read about corruption and errors were AfterUpdate events change the current record, ie upsetting the natural flow of events. Is making the listbox unbound sufficient to avoid this or am i set for corruption on down the line?

Regards

Gary
Feb 4 '09 #1
1 1450
ChipR
1,287 Expert 1GB
I don't see any way that this could create problems.

Chip
Feb 5 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

16 posts views Thread by Steve Jorgensen | last post: by
5 posts views Thread by EManning | last post: by
5 posts views Thread by soni2926 | last post: by
reply views Thread by Pradnyesh Sawant | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.