Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
You receive an error message when you start Visual Basic for Applications code in an Access database
Article ID: 907337 - View products that this article applies to.
When you start Microsoft Visual Basic for Applications (VBA) code in a Microsoft Access database, you may receive an error message that resembles the following:
The expression On Click you entered as the event property setting produced the following error: A problem occurred while Microsoft Access was communicating with the OLE Server or ActiveX Control.
This issue may occur if the following conditions are true:
To resolve this issue, use the appropriate method.
Method 1: Verify the non-Unicode languageIf you are running the VBA code on a Microsoft Windows XP-based computer or on a Windows 2000-based computer, you may be able to resolve this issue by changing the non-Unicode language setting on the computer where you are running the VBA code. To verify and to change the non-Unicode language setting, follow these steps.
Note Because there are several versions of Microsoft Windows, the following steps may be different on your computer. If they are, see your product documentation to complete these steps.
Method 2: Remove accented characters or special characters from the VBA code and from database objectsTo resolve this issue, remove any accented characters or special characters that appear in the VBA code or in database objects. For example, form sections and report sections that were created in localized versions of Access may contain accented characters or special characters.
To rename an Access object, or a section in an Access object, that contains accented characters or special characters, follow these steps:
Steps to reproduce the issue