Recordset Object Events

Recordset object events must be trapped by creating a WithEvents Recordset object variable in a class module. Trapping these events is necessary whenever you are using a Recordset object asynchronously, because these events are what notify your application that the Recordset object has completed its task.

Covering asynchronous recordset usage is beyond the scope of this chapter; however, the topic is important enough to deserve mention so that you can pursue it further if you like. The two most commonly used Recordset object events are:

□ FetchComplete — This event is fired after all of the records have been retrieved when opening an asynchronous recordset.

□ FetchProgress —The provider fires this event periodically to report the number of records retrieved so far during an asynchronous open operation. It is typically used to provide a visual progress indicator to the user.

0 0

Post a comment