Access Error Message

I usedWindowXp andMicrosoft Office Professional 2003 before, then changed toWindow 7 and  Microsoft Office Professional 2010 last month, error message appeared when I wanted to update the data base in Access file:
The expression Before Update 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.
I clicked"Help" the following message came out :
"This error occurs when an event has failed to run because the location of the logic for the event cannot be evaluated. For example, if the OnOpen property of a form is set to =[Field], this error occurs because a macro or event name is expected to run when the event occurs."

Please help me to solve this problem.

First thing to check is References...

http://www.access-diva.com/d5.html

Second thing to check is Trusted Locations...

http://www.access-diva.com/d4.html


--
Gina Whipp
Microsoft MVP (Access)

Please post all replies to the forum where everyone can benefit.
Gina Whipp
Microsoft MVP (Access 2010-2015)
https://www.access-diva.com/tips.html

32 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I agree with Gina in principle, but I am struck with this part of the error message: "Microsoft Access was communicating with the OLE server or ActiveX control". Do you have any (perhaps accidental) ActiveX controls on the form? Are you using OLE Automation in the code-behind?

 


-Tom. Microsoft Access MVP
-Tom.
Microsoft Access MVP
Phoenix, AZ

95 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

In addition to the suggested items, also one cause can be putting VBA code in the event property instead of in the event itself in the VBA Window.  So if you have put anything in one of the events in the property dialog, that may potentially be the problem.
Bob Larson, Former Access MVP (2008-2010) http://www.btabdevelopment.com (free Access tools, tutorials, and samples)
-----
Microsoft Access MVP 2008, 2009, 2011
If a post was helpful click the FOUND THIS HELPFUL link

9 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I have the same error, when running my Old MS Access program in MS Access 2007 in windows 7 OS. I have searched all possible answers in the net and installed as well SP2 for MS Access 2007 but did not solve my problem.

What I did, I personally analyzed between the old OS and the new OS files of what possibly missing, after thoroughly
figured out, I have found this solution:

For Access Program Error in windows 7:

 You need to download the file:

1.         LangWrbk.dll

2.         Srchui.dll

3.         OWC11.dll     

- The first file copy it to windows/system32 folder.

- The second file copy it to windows folder under srchasst  folder (if not available, create)

and ServicePackFiles\i386 folder (if not available, create)

- The third file, copy it to windows/system32  folder.

 

If it’s still not working, check the following files, if not available, do the following:

-Copy Dao2535.tlb to folder: C:\Program Files\Common Files\Microsoft Shared\DAO

-Copy OFFOWC.dll to folder: C:\Program Files\Common Files\Microsoft Shared

-Copy OFFOWC.dll to folder: C:\Windows\System32

 

 

Now, I hope your old access program will now run in Access 2007 in Windows 7 OS.

8 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Ben=RazillHamid,

 

While that fix may have worked for you that would not be the recommended fix for this particular issue.  Two of those files will cause your Access file issues and/or crash once upgraded...

Srchui.dll

OWC11.dll

Depending on your version of Access, you may actually be able to remove those References.  See...

Repair (or Remove) Missing or Broken References

Gina Whipp
Microsoft MVP (Access 2010-2015)
https://www.access-diva.com/tips.html

4 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

This will probably fix it, i had same problem, the form or report needs parameters before it open, especially if it is trying to run a query which relies on them aswell, in your form or report Open function in VB put something like the following


Dim rst As DAO.Recordset

Dim db As DAO.Database

Dim qdf As QueryDef

Dim frm As Form


Set db = CurrentDb

Set frm = Forms!reporting

Set qdf = db.QueryDefs("DataCrosstab1")

qdf.Parameters("[Forms]![Reporting]![System]") = frm.System

qdf.Parameters("[Forms]![Reporting]![start]") = frm.start

qdf.Parameters("[Forms]![Reporting]![end]") = frm.end

qdf.Parameters("[Forms]![Reporting]![area]") = frm.Area

qdf.Parameters("[Forms]![Reporting]![phase]") = frm.Phase


Obviously just change your paramters to the ones it is looking for, in the example above i am trying to open forms.reporting and the error occurs, this fixes mine

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

The below worked for me:

http://support.microsoft.com/kb/907337

5 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I solved this for one user in Access by changing the setting 'compile on demand' from the options/general tab in the vba editor.

 

DG

12 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

How does one put VBA in the event property instead of the event itself?  How do these things differ? What does this mean precisely? How can it come about? How could I find instances of this in my code? Usually, I just click on the appropriate property and it takes me to the VBA for the event handler.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

How does one put VBA in the event property instead of the event itself?  How do these things differ? What does this mean precisely? How can it come about? How could I find instances of this in my code? Usually, I just click on the appropriate property and it takes me to the VBA for the event handler.

create function (not a sub), then put it into the event property:


not much difference really.

the only benefit I can think about, is that if you copy/paste such control, then the property comes with the control, and you do not need to copy event handler after that.

to find instances of such properties, I suggest using Find & Replace utility (http://www.rickworld.com/products.html), which can search properties across the database.

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated May 10, 2024 Views 67,470 Applies to: