LarryA15,
Try "adOpenStatic" instead. If "adOpenKeySet" cannot work.
Also try to make sure ADO is reference the the VBA editor.
Also, try 2.8 or 6.1 instead of 2.1. 2.1 is too old.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
After recently upgrading from Office 2010 to Office 2021, a report fails with a type mismatch error. I've made no changes to the code, and it still works in Access 2010. In addition to the code below, RecCount is declared Public Integer.
The references are: Visual Basic For Applications; Microsoft Access 16.0 Object Library; OLE Automation; Microsoft Outlook 16.0 Library; Microsoft ActiveX Data Objects 2.1 Library.
Any suggestions would be greatly apreciated.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
LarryA15,
Try "adOpenStatic" instead. If "adOpenKeySet" cannot work.
Also try to make sure ADO is reference the the VBA editor.
Also, try 2.8 or 6.1 instead of 2.1. 2.1 is too old.
Changing 2.1 to 6.1 did the trick. Thanks to everyone who responded.