Microsoft KB Archive/209817

= ACC2000: DoEvents, SendKeys May Not Be Supported in Custom Functions =

Article ID: 209817

Article Last Modified on 6/24/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q209817



Moderate: Requires basic macro, coding, and interoperability skills.



SUMMARY
Under certain circumstances, DoEvents and SendKeys are not supported when called by user-defined (custom) functions in Visual Basic for Applications.



MORE INFORMATION
DoEvents and SendKeys are not supported in user-defined functions in the following situations:
 * When calculating a field in a query.
 * When calculating a control on a form or report.
 * From a Visual Basic Fill function for a list box, combo box, or OLE Object field.

The DoEvents statement will not allow messages to be processed in these circumstances; instead, it will immediately return. Thus, any keys sent through SendKeys statements or functions will not be processed until all the computations listed above have been completed and responses have been returned to the user.

