By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,139 Members | 1,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,139 IT Pros & Developers. It's quick & easy.

Is my use of the AfterUpdate and Current Events dangerous?

P: 18
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
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 1,287
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.