Problem with the OLE server or ActiveX Control

gray

Registered User.
Local time
Today, 23:02
Joined
Mar 19, 2007
Messages
578
Hi All

WinXPPro
Access 2002 SP3

I think I am beginning to hallucinate....

I have been building a form for some months now. Just recently I encountered the following error when I attempted to open it:

The expression On Open 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”

I’ve spent several days on this; including various permutations of the follwing:-

Compact and repair
Compile / decompile / compile
Importing form into new blank database
Exporting form and recreating to/from a text file
Creating new blank database and new blank form then copying controls from old to new.
Setting / re-setting ‘Form has module’ parameter including building of the module, event-by-event.
Setting XPs regional settings to UK.

In desperation, I have deleted the form’s controls one-by-one thinking I might have a corrupt control or invalid name. I now have NO controls at all … still I get the same error.

I have also deleted VB references one-by-one leaving only :-

Visual basic for applications
Microsoft Access 10 object library

Still I get the same error….

Finally, I have deleted all events from my form’s module leaving only:-

Option Compare Database

Private Sub Form_Open(Cancel As Integer)

End Sub

Still I get the same error….

To summarise, there are:
- no controls on my, almost new, form in my. almost new. Db,
- only the above statements in it’s module
- the 2 minimum VB references…

Still I get the error…

Can anyone help diagnose this please?

Thanks
 
Hi

I think I may have resolved this.... for those suffering the same fate here's what I think happened.

I believe the module for the form became corrupted somehow, which is why I tried so many things to clear it, including de-compilation.

Eventually I built a new Db and form and gradually copied objects/forms/modules and events into it. (it would have been impossible to re-write from scratch!). En-route, I copied module code into Notepad before copying it into the new Db and form. This was in an effort to lose any unseen control or other didgy characters from the module editor. At this point I was still getting the OLE/ActiveX errors.

I re-copied all my code from old Db to new Db but this time I switched Notepad's word-wrap on and off a couple of times whilst the code was parked in it. Maybe it's pure coincidence but since doing so (with word-wrap off), I seem to have lost the OLE Server/ActiveX issue?

Curiously, I've copied loads of stuff via Notepad in the past with word-wrap on (to try to maintain code indents) but in this case maybe the unseen dodgy characters were left intact.. and switching word-wrap off had the effect of clearing them.

It's been 3 loooong days of effort for me... I hope this might help you to avoid that!
 
Waaaaahhhhhh!!!!

I spoke too soon...... after a few minor edits... my Db has just prompted me with the OLE / ActiveX Error again.... And better still, the good backup I took of it before those edits is now suffering the "Sorry Access has Encountered an Error and Must close"...

What the hell is going on??? It sounds O/S environmental but what and why?
 
Hi

I think I may have resolved this.... for those suffering the same fate here's what I think happened.

I believe the module for the form became corrupted somehow, which is why I tried so many things to clear it, including de-compilation.

Eventually I built a new Db and form and gradually copied objects/forms/modules and events into it. (it would have been impossible to re-write from scratch!). En-route, I copied module code into Notepad before copying it into the new Db and form. This was in an effort to lose any unseen control or other didgy characters from the module editor. At this point I was still getting the OLE/ActiveX errors.

I re-copied all my code from old Db to new Db but this time I switched Notepad's word-wrap on and off a couple of times whilst the code was parked in it. Maybe it's pure coincidence but since doing so (with word-wrap off), I seem to have lost the OLE Server/ActiveX issue?

Curiously, I've copied loads of stuff via Notepad in the past with word-wrap on (to try to maintain code indents) but in this case maybe the unseen dodgy characters were left intact.. and switching word-wrap off had the effect of clearing them.

It's been 3 loooong days of effort for me... I hope this might help you to avoid that!

thank you very very muchhhhhhhhhhhhhhhhhh
 
This type of error usually, but not always, associated with opening a Form, is apparently caused by all kinds of things, and, to the best of my knowledge, it is very seldom, if ever, actually connected with communicating with a OLE server or ActiveX Control!

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, 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

And always a possible solution, when things suddenly go phooey, for no apparent reason, is to create a new, blank Access file and Import everything into it.

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom