The expression On Click you entered as the event property setting produced error

AlvaroCity

Registered User.
Local time
Today, 00:31
Joined
Jul 16, 2016
Messages
70
Hello there

Maybe this thread has been solved in the past. In that case my apologies but I couldn't find anything.

The problem is that I am trying to add some functions to a form and a button.

Well after finishing I get the following error message:

The expression On Click you entered as the event property setting produced the following error: A problem occurred while Microsoft Access was communicating with the OLE server or ActiveX Control.

*The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]
*There may have been an error evaluating the function, event, or macro.

1-Well I have delete all the code and just put "docmd.beep" and the error is still the same. So the problem is not the code.
2- I created a new user on my Windows10 and I don't know if there is a relation with the problem somehow.

I hope you please can help me.

Thank you in advance.
 
Well if that is all it is doing it should work so obviously there is something else going on. You need to upload the database.
 
Ok, well it is not the button or the on-click event as you can create new buttons which all do the same thing.

From reading about this, it is common for this to happen on non-English databases due to different characters being used. The recommended solution is to import all items of the database into a new database and try again.

If you google "A problem occurred while Microsoft Access was communicating with the OLE server or ActiveX Control" you will get the idea but it is supposedly some underlying corruption.
 
It is corruption. I get it occasionally with a treeview control. The only way to fix it is to either reimport everything into a new database, or if you have a working backup of the form delete the troublesome one and re-import it.
 
The most common cause, going by what I've seen online for the past ten years, has to do with using a non-English language with Access, as appears to be the case, here, and the need to set the language for non-unicode programs to that foreign language. Here's a link explaining this:

You receive an error message when you start Visual Basic for Applications code in an Access database

Note that although this link gives a specific Version of Windows and/or Access, the same problems persist over all combinations of Access and Windows, and the error can pop via an OnClick event, as well as when opening a Form, as the article title states.

And yes, if this fails, the next thing to try would be create a new, blank Access file and Import everything into it.

Linq ;0)>
 
Hello everyone
I think I have solved this. What I have done is basically get a copy of my database and redo the form that I had problems with.

I hope not to see that horrible message again :D

BY THE WAY

I bumped in to another problem....

The thing is that in this form when I introduce the date (fecha in spanish) in the txtbox to filter the form this does not do it properly.
I realized that the problem is that the Format of the date is in American (eg. "12/31/2016") instead of European

Untitled.png
Untitled1.png


Thank you everyone. You are the best!!!
 

Users who are viewing this thread

Back
Top Bottom