Problem "With Communicating with OLE Server" Using Non-Latin Alphabet Databases

MajP

You've got your good things, and you've got mine.
Local time
Today, 13:37
Joined
May 21, 2018
Messages
8,933
I kind of stop helping people on this site that post databases not developed in a Latin alphabet based database (examples Arabic, Cyrillic), because I run into too many problems that cannot be fixed without a rebuild from scratch. The problem I see often is this message when I try to modify code or other design changes.

OLE failure.PNG

AFAIK the users do not see these errors when designing in their own databases.

The only success I have had is to rebuild the form from scratch.
So in the above example the form runs fine. I added a click event procedure without any code. Same if adding other events. There is no code in the event procedure. There are no ActiveX controls, no OLE Objects, no broken or missing references. And the expression clearly results in an "[event procedure]'".

I have tried
1. Decompile
2. Creating a new database and importing objects
3. SaveToText and LoadFromText on the form

This is similar to what I have seen in other non-latin alphabet developed DBs. So the error message AFAIK is unrelated to the real problem due to language incompatibility
.
Unfortunately the form I need to fix is pretty involved and I am not desiring to rebuild it for the user. I will likely provide the code and have them try entering themselves.

Anyone seen this, and have any ideas? Any settings that can be adjusted? I have seen the issue often and only on non-latin based dbs so this problem is not unique to this form or database.
 
Any settings that can be adjusted?
I assume, the problem is triggered if any character was used inside the VBA environment that is not part of the character set you configured for VBA on your computer ("Language for non-Unicode programs"). - This would be a setting to adjust, if you want to work on the file without fixing the problem.

Even though the error message appears to be misleading at first glance, it may actually be not far off.
"The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]."

And the expression clearly results in an "[event procedure]'".
Well, yes, but not really. The EventProcPrefix property stored in Access with Unicode support is different from the actual event procedure in the VBA project without Unicode support. This might not necessarily apply to the event procedure you just added but a different one that prevents the module from being compiled.

I have tried
1. Decompile
2. Creating a new database and importing objects
3. SaveToText and LoadFromText on the form
All these steps preserve Unicode characters in the Access form and control properties. - I'm not surprised that they didn't fix the problem.

What should work if my hypothesis is correct:
  1. Export using SaveAsText
  2. Remove/replace all non-ANSI characters in control names
  3. Remove/replace the corresponding characters in the VBA code
  4. Import the files with LoadFromText.
 
Thanks I will give it a try.
 
Wow! That worked well! There was probably 100 controls on this form. I did a Saveastext and did a Find on "Name". Of all the controls only one used non latin alphabet. This was only an image control showing a static picture. Changed it and it worked. However this control did not have any associated events.

This fixed conditional formatting that would not work at all on the form.

I probably should post this a seperate thread with the solution. I scoured the internet and no one even got close on this answer.
 

Users who are viewing this thread

Back
Top Bottom