Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-14-2019, 12:14 AM   #1
smig
Newly Registered User
 
Join Date: Nov 2009
Location: Israel
Posts: 2,043
Thanks: 82
Thanked 134 Times in 125 Posts
smig is on a distinguished road
ActiveX OLE error

I have an AC2016
I opened it in 2013 with No problem.
I debugged with no problem.

When I open a form, any event I try to run (Timer, Form_Open...) causes an ActiveX or OLE error, even if this event is empty and do nothing

Checking the references seems to be OK and all ver16 where replaced with ver15

is it possible that shell32.dll, kernel32.dll, user32.dll or wininet.dll are causing the problem ?
They all declared with PtrSafe

smig is offline   Reply With Quote
Old 11-14-2019, 12:24 AM   #2
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,233
Thanks: 115
Thanked 3,072 Times in 2,790 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: ActiveX OLE error

Impossible to tell on that information. Those DLL are used in APIs but if you have the same bitness what works in one version should work in the other.

In any case I wouldn't expect API declarations to cause the errors you state.

Possibly corruption. Try decompiling your application then recompile and finally compact. Make a backup first just in case
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)
isladogs is offline   Reply With Quote
Old 11-14-2019, 12:32 AM   #3
smig
Newly Registered User
 
Join Date: Nov 2009
Location: Israel
Posts: 2,043
Thanks: 82
Thanked 134 Times in 125 Posts
smig is on a distinguished road
Re: ActiveX OLE error

Quote:
Originally Posted by isladogs View Post
Impossible to tell on that information. Those DLL are used in APIs but if you have the same bitness what works in one version should work in the other.

In any case I wouldn't expect API declarations to cause the errors you state.

Possibly corruption. Try decompiling your application then recompile and finally compact. Make a backup first just in case
The application compile and run with no problem on both AC2016 32bit and AC2016 64bit.

what do you mean decompiling and then recompile?

I tried to comapct, and I had the same error once the application started and loaded the AutoExec_Form.

same problem even if I left the form's events empty.

smig is offline   Reply With Quote
Old 11-14-2019, 12:36 AM   #4
smig
Newly Registered User
 
Join Date: Nov 2009
Location: Israel
Posts: 2,043
Thanks: 82
Thanked 134 Times in 125 Posts
smig is on a distinguished road
Re: ActiveX OLE error

Could it be PtrSafe won't work correctly for Access 2013 and I must check Office version ?

*** Edit ***
According to MS it should be OK since version 2010
https://docs.microsoft.com/en-us/off...tions-overview

Last edited by smig; 11-14-2019 at 12:41 AM.
smig is offline   Reply With Quote
Old 11-14-2019, 12:51 AM   #5
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,233
Thanks: 115
Thanked 3,072 Times in 2,790 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: ActiveX OLE error

Compiled code can get corrupted. Decompiling removes all compilation code and can solve a lot of issues. See http://www.fmsinc.com/microsoftacces.../Decompile.asp
Its a very useful tool in any developers toolkit.

Obviously I've no idea what's in your startup form but you could check whether that's causing an issue by using the shift bypass so it doesn't run. Then try opening other forms
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)
isladogs is offline   Reply With Quote
The Following User Says Thank You to isladogs For This Useful Post:
smig (11-14-2019)
Old 11-14-2019, 04:05 AM   #6
missinglinq
AWF VIP
 
missinglinq's Avatar
 
Join Date: Jun 2003
Location: Richmond (Virginia that is!)
Posts: 6,319
Thanks: 11
Thanked 721 Times in 671 Posts
missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light
Re: ActiveX OLE error

Was the error something like this:

"A problem occurred while Microsoft Access was communicating with the OLE Server or ActiveX Control."

This type of error, usually but not 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, nor is it ever caused by the possible reasons given by the message!

The most common cause, going by what I've seen online for the past seven years, has to do with using a non-English language with Access, and 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 always a possible solution, as already mentioned, when things suddenly go phooey, for no apparent reason, is to create a new, blank Access file and Import everything into it.

Linq ;0)>
__________________
The Devil's in the Details!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


(All code solutions tested in Access 2003/2007, before posting, unless otherwise noted.)
missinglinq is offline   Reply With Quote
The Following User Says Thank You to missinglinq For This Useful Post:
smig (11-14-2019)
Old 11-14-2019, 04:17 AM   #7
smig
Newly Registered User
 
Join Date: Nov 2009
Location: Israel
Posts: 2,043
Thanks: 82
Thanked 134 Times in 125 Posts
smig is on a distinguished road
Re: ActiveX OLE error

Quote:
Originally Posted by isladogs View Post
Compiled code can get corrupted. Decompiling removes all compilation code and can solve a lot of issues. See http://www.fmsinc.com/microsoftacces.../Decompile.asp
Its a very useful tool in any developers toolkit.

Obviously I've no idea what's in your startup form but you could check whether that's causing an issue by using the shift bypass so it doesn't run. Then try opening other forms
Yes you do know what's in my startUp form. You helped me with it
The error raise for other forms as well, and even if there is no code in it.

Missingling might directed me to the issue, as we do use Hebrew

smig is offline   Reply With Quote
Old 11-14-2019, 04:19 AM   #8
smig
Newly Registered User
 
Join Date: Nov 2009
Location: Israel
Posts: 2,043
Thanks: 82
Thanked 134 Times in 125 Posts
smig is on a distinguished road
Re: ActiveX OLE error

Quote:
Originally Posted by missinglinq View Post
Was the error something like this:

"A problem occurred while Microsoft Access was communicating with the OLE Server or ActiveX Control."

This type of error, usually but not 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, nor is it ever caused by the possible reasons given by the message!

The most common cause, going by what I've seen online for the past seven years, has to do with using a non-English language with Access, and 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 always a possible solution, as already mentioned, when things suddenly go phooey, for no apparent reason, is to create a new, blank Access file and Import everything into it.

Linq ;0)>
Yes, the error is something like that.
Multilingual is probably the cause.
smig is offline   Reply With Quote
Old 11-14-2019, 05:11 AM   #9
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,233
Thanks: 115
Thanked 3,072 Times in 2,790 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: ActiveX OLE error

Quote:
Originally Posted by smig View Post
Yes you do know what's in my startUp form. You helped me with it
The error raise for other forms as well, and even if there is no code in it.

Missingling might directed me to the issue, as we do use Hebrew
Ah but I didn't know it was the same app
Anyway pleased that you now have a solution

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)
isladogs is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveX Dll error 3078 agadkinsjr Visual Basic 0 10-07-2013 12:04 PM
ActiveX error spcepickle Modules & VBA 1 05-05-2008 09:57 AM
ActiveX Error smolki General 4 05-08-2003 07:39 AM
ActiveX Error Sharad Modules & VBA 0 04-09-2003 04:49 PM
ActiveX control error gguy Forms 0 09-24-2002 08:17 AM




All times are GMT -8. The time now is 10:26 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World