Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

On Click Error: "occurred while Microsoft Access was communicating with the OLE Server or ActiveX Control"

Seems like this is has been asked a few times before.

After working on a form for a few weeks, I suddenly get the error when I click on a button: "The expression On Click you entered as the event property produced the following error: A problem occurred while Microsoft Access was communicating with the OLE Server or Active X Control."

This also happens with any control's event on the form (e.g. After Update on other text fields)

I tried re-installing Access to no avail.

Not sure if this is relevant, but I have a subform on the form as well. I have an "on-click" event that works on the subform, but when the code breaks at the following line (which worked before):

Me.Parent.orderID = Null

The error I get is: "Method 'Parent' of object '_Form_frmOrderQuery' failed (frmOrderQuery is the name of the subform)

Anyway, this all worked before until I changed the query for the subform by adding a few more fields.

Finally: All of the event handlers (button click, after-update, etc) work on my other forms in the database.

Any help/suggestions would be greatly appreciated.

Thanks,

jeff

like image 527
JeffO Avatar asked Oct 24 '25 19:10

JeffO


2 Answers

Figured it out, this was stupid easy. Whatever Form is having issues, just copy it and delete the old form. Rename the new form to the same as the last (so all your vba and stuff works). Done!

like image 52
mikemaster Avatar answered Oct 26 '25 14:10

mikemaster


As other users mentioned the problem is in use of non-English symbols in element (form control, etc.) names. My way to solve it:

  1. (may be unnecessary) Create an event procedure for any element on a form.
  2. Switch to Code Editor.
  3. Place cursor inside any procedure.
  4. Open drop-down list with element names (the left one above the code window).
  5. Check if you see some names with "?????" in them.
  6. If 5 is true, then figure out what the elements are, find them on the form and rename using only basic latin alphabet.
like image 23
AlexVB Avatar answered Oct 26 '25 16:10

AlexVB