Suppose you have a listbox and you need to perform some action in the listbox AfterUpdate event procedure. But the problem is that your action is pretty heavy (it involves opening recordset based on complicated query, making some calculations and hiding \ viewing controls, based on the results). So when the user tries to "walk" through the list pressing Up and Down arrows (triggering AfterUpdate event at each step), it appears to be VERY slow.
The solution I present here uses the ability of Access to evaluate calculated fields asynchronously.
1. Create a function in form module.
Expand|Select|Wrap|Line Numbers
- Function MyAction() As String
- 'put your action code here
- End Function
Expand|Select|Wrap|Line Numbers
- =[ListBox1] & MyAction()