467,116 Members | 1,165 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,116 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
  • viewed: 1392
Share:
1 Reply
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@yahoo.com | 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.