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

ID: Q209817


The information in this article applies to:
  • Microsoft Access 2000


SUMMARY

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

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 "SendKeys Statement" in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Additional query words: udf

Keywords : kbprg kbdta PgmErr
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: May 13, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.