32Bit To 64Bit Conversion.

DeniedAccess

New member
Local time
Today, 02:34
Joined
Jul 10, 2024
Messages
1
Hi Everyone,

The Access DB developer has left my company and I've been tasked with converting the Access DB's to 64bit. I have the original accdb file I can see and edit all forms, modules, tables etc. I've been researching all day and came to the conclusion that I might not have to amend any code with "PrtSafe" or "LongPtr" as the only module that has any "Declare" is the basMouseHook (The code states Wayne Phillips from everythingaccess.com). I believe since Office 2010, that's not needed anymore as it's built in Office now.

In an attempt to remove basMouseHook, from the Visual Basic for Applications, I tried right clicking on the basMouseHook module and selecting remove basMouseHook and then saving as accde. That didn't work, it was displaying message suggesting something is trying to call "basMouseHook". I did a search in the project for basMouseHook and it seems to be mentioned in the code for the form. There is around 50 class objects for the forms.

My first question is - Is disabling basMouseHook the best way forward here?

If it is, Without amending the code for the forms, Is there a easier way to remove the basMouseHook module in a safe way so that the other aspects of the project aren't calling it / using it?

Thanks
Si
 
I would just comment out code for now.
 
Hi. Welcome to AWF!

Even if a replacement is already built-in, you surely have to replace any code that calls the old way and modify it to use the new built-in option. You can either do that or simply add the PtrSafe part to the old code just to see if that makes a difference.
 
Perhaps the basMouseHook by Wayne Philips disables the mouse scroll wheel in Access forms, it only works in 32 bit MS Access. AFAIK there is no 64 bit version and no way to disable the mouse scroll wheel in 64 bit MS Access.

If I'm not mistaken if you want to disable it, you have to comment these lines in the forms where it's used.

Code:
Private Sub Form_Open(Cancel As Integer)
     'Static MouseHook As Object
     'Set MouseHook = NewMouseHook(Me)
End Sub
 
Last edited:
My first question is - Is disabling basMouseHook the best way forward here?
Yes, I think so.

You can either do that or simply add the PtrSafe part to the old code just to see if that makes a difference.
Wayne's Mousehook code is not your typical 32to64bit conversion. The module includes a COM class in assembly language that is embedded in a string in the module and loaded into memory at runtime.
Unless you feel qualified to adapt or replace the assembler code for 64bit you should not even try to convert this module to 64bit.

PS: Wayne wrote a pretty detailed description on how the Mousehook module works. Even if this is as far beyond your current skills as it is beyond mine, it is interesting to read what and how things work with this technique.
 
Last edited:
Usually,when removing this type of code, I start by commenting out the procedure that does the work. Then I compile and that gets me all the broken references. Then I examine the references and see if i need to replace the code with something else. If I wasn't going to replace the call, I just commented each out until the code compiled clean. Then you test to see if anything breaks.

I've never used this particular add in. Once I discovered the problems with distributing addins, I removed all that I had been using and either built my own functionality or went without.
 

Users who are viewing this thread

Back
Top Bottom