ACC2000: DoEvents, SendKeys May Not Be Supported in Custom Functions (209817)



The information in this article applies to:

  • Microsoft Access 2000

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.

REFERENCES

For more information about DoEvents, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type DoEvents in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

For more information about SendKeys, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type SendKeysStatement in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Modification Type:MajorLast Reviewed:6/24/2004
Keywords:kbinfo kbProgramming KB209817