https://accessthemes.gumroad.com/l/ftrap/Free

Has Access has stopped working with an Error Message about 64-bit

You open your Access database that has been working for years and it now displays.!

Bootstrap Image Preview

How big is the problem

To find out, download and run our free scanner.

Included in the download is our ApiViewer, which provides 64-bit compatible versions of API functions to assist the manual15:32 26/04/2024 updating process.

As an alternative to manual updating we can supply our Access32to64Updater that automates the process.

For Updater details please Contact us

What's wrong?

In the VB Editor lines that are not compatible with 64 Bit Access show red.

Error Lines

Code with red errors

The Solution

Update all "Declare" statements to include PtrSafe and adjust their parameters from Long to LongPtr, where required. (LongPtr automatically becomes a Long in 32 Bit Office and LongLong in 64 Bit.) Adjust the code where API functions are called so that variables in the calls match the new data types in the Declare statements.

Updated lines with highlighted changes.

How big is the problem?

To determine the size of the problem run our Free AccessAPIScanner. It will tell you how many Declare statements there are and if there any that do not currently have known PtrSafe versions.

AccessAPIScanner2 (Beta) available 24/04/29

Download our original FREE AccessAPIScanner and Viewer

Scanner

API Scanner

If there any Declares without details the "Unknown" functions can be sent to ThemeMyDatabase for checking and possible inclusion in future updates.

Small number of Procedures to update.

Use our win32APIViewer which is supplied with the Scanner. For each Declare statement highlight and copy the Alias name and paste it into the Declares form of the viewer. (If there is no "Alias" use the Function/Sub name) After pressing enter the correct Declare statement will appear. It will have been automatically added to the clipboard ready to be pasted into your VBA code. When all Declares have been updated compile your Database. Type mismatch errors will occur in the calling code where there is a difference between the parameter type in the old and updated Declare statments. Adjust the Dims in the calling functions to match the new parameter types.

Viewer options.

API Viewer

Searching for the first Function in our errors

API Viewer search

The Name has been filled in as OpenClipboard

Updated Declare is displayed. Showing PtrSafe and LongPtr.

API Viewer sample

The updated Declare has been added to the clipboard ready to paste into your VBA code.

Larger number of Procedures to update.

Use our Access32to64Updater!

The Updater checks your VBA code for Declare statements and any User Defined Types used by those functions and updates the Declare statements and Types where needed. It then adjusts the Dim statements in the calling code and optionally creates tests forms for simply checking the functionality of the updates within those

Access32to64Updater

API Updater



Contact us for more details

© ThememyDatabase.co.uk 2024