Fix Method or Data Member Not Found in Access 64-Bit VBA
Question details
The user needs to resolve a VBA compile error triggered during a database architecture upgrade.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Converting an existing 32-bit Access MDB database to a 64-bit ACCDB format.
- Observed behavior
- The VBA compiler displays a 'Compile error: Method or data member not found' message due to 64-bit compatibility issues.
Verify that your Microsoft Office installation is fully updated to the latest 64-bit version and review Microsoft's official documentation for VBA 64-bit migration before altering your code.
Identify and Replace Unsupported Object Members
Pinpoint the exact object or method causing the error, as some 32-bit API calls or ActiveX controls are unsupported in 64-bit Access.
Standard string concatenation (&) and comparison operators (<>) are identical in both versions. The error is typically triggered by a missing library, an unsupported ActiveX control, or incorrect 32-bit API declarations.
Open the VBA Editor in your Access ACCDB file and navigate to Debug > Compile Database from the top menu.
Note the exact line and object member highlighted by the compiler when the error pops up.
Check if the referenced control or library is supported in 64-bit Access via the Tools > References menu.
If the error stems from Windows API calls, update the syntax by adding the 'PtrSafe' keyword and replacing 'Long' data types with 'LongPtr' where appropriate.

Replace InputBoxes with Unbound Combo Boxes
Prevent data mismatch and reference errors by using unbound combo boxes to restrict selections to valid database entries.
Looking for a Lightweight and Compatible Office Suite?
While Microsoft Access databases require specialized handling, you can easily manage your daily spreadsheets, documents, and presentations with WPS Office. It offers robust VBA and Macro support for automated tasks, full compatibility with standard formats, and a highly familiar user interface without heavy subscription costs.
- 1. Download the Installer: Visit the official WPS Office website and download the free installation package.
- 2. Install WPS Office: Run the installer and follow the quick setup instructions to integrate WPS Office on your device.
- 3. Enable VBA Functionality: Open WPS Spreadsheets or Writer, navigate to the Developer tab, and access the VBA editor to manage your macros seamlessly.

Frequently Asked Questions
Why do I get 'Method or data member not found' only in 64-bit Access?
This error generally occurs because certain 32-bit ActiveX controls, third-party add-ins, or specific API references behave differently or are entirely missing in the 64-bit environment.
Do standard comparison operators work the same in 64-bit VBA?
Yes, standard syntax like string concatenation (&) and comparison operators (<>) remains unchanged in 64-bit VBA. The error is almost always pointing to an unavailable object member or library.
How do I fix 32-bit API declarations in 64-bit Access?
You need to update your API 'Declare' statements by adding the 'PtrSafe' attribute. Additionally, you must change variables that store memory pointers or handles from standard 'Long' data types to 'LongPtr'.




