0

After creating an ACCDE file from ACCDB, several events are throwing up errors - although they continue to work flawlessly in the ACCDB file.

For example, in the ACCDB file - a user has clicked the" Login" button after entering username and password. The OnClick event hashes the text password to generate a SHA256 string, which is then compared with stored hashes to authenticate the user. The ACCDB file uses the Microsoft Scripting Runtime ("C:\Windows\SysWOW64\scrrun.dll") to generate the hash. Look at the function below and its output in the Immediate Window.

ACCDB Immediate Window Output

However, the same event in the ACCDE file throws an error. Look at the error below ("... problem occurred while communicating with OLE Server ...")

ACCDE Error Screenshot

Once the Hash function is bypassed, the ACCDE code works normally.

I have tried decompiling/ recompiling multiple times. I have also removed all references and added them again before recompiling. But the error persists.

Can somebody explain why is this happening and how to overcome this issue?

2
  • 2
    One option is to Utilise Microsoft's Next Generation Cryptography (CNG) API in VBA which uses plain API calls as shown in my reposotory at GitHub; VBA.Cryptography. Commented Apr 25, 2024 at 11:36
  • 1
    Although the 'why' part of my question remains to be answered, the 'how' part is resolved. Thanks Gustav. Commented Apr 26, 2024 at 4:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.