Solved

LookupRecord action in Data Macros causes error in Access 2010 client but not on SharePoint

Posted on 2010-09-04
1
1,337 Views
Last Modified: 2013-11-27
I am building an application in Access 2010 that is publshed to sharepoint through Access Services. I am trying to write a simple Before Change Data Macro that looks up information from a separate table and writes it to a field in the original table.

After saving the macro, going back to the table to which it is attatched, and editing a record, I get the following error:

The Microsoft Access database engine encountered an error while communicating with SharePoint. More detailed information: 'Error executing validation macro: .'

This error seems to be present in every macro where the LookuipRecord action is used, no matter what the context.

 When I attempt to edit the data in the table directly, this error prevents the macro from performing the desired action

When the data in the table is edited through a datasheet form in the Access 2010 client, the same error is displayed. However, the macro appears to work as expected--the desired value is pulled from the lookup table and written to a field in the original table.

When that same datasheet is viewed in a browser through Access Services, the macro also appears to work as expected, except without the error.

Does anyone have an idea what is causing this error and how to fix it? Could it be a problem with my host? Here is the XML of the macro, which is attatchd the "Contacts" table and looks up to the "Companies" table:

<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<DataMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application">
<DataMacro Event="BeforeChange">
<Statements>

<LookUpRecord>
   <Data><Reference>Companies</Reference>
        <WhereCondition>[Contacts].[Referenced Company]=[Companies].[ID]</WhereCondition>
   </Data>
   <Statements>
      <Action Name="SetField">
         <Argument Name="Field">Contacts.Company</Argument>
         <Argument Name="Value">[Companies].[Company Name]</Argument>
      </Action>
   </Statements>
</LookUpRecord>
</Statements>
</DataMacro>
</DataMacros>

Open in new window

0
Comment
Question by:andrew_stegmaier
1 Comment
 

Accepted Solution

by:
andrew_stegmaier earned 0 total points
ID: 33632948
I've spoken with my hosting provider, and he explained that this behavior is due to a bug that Microsoft has confirmed to exist for Sharepoint 2010 when it is running in "Host Header Mode" (for multi-tenant hosting). The hotfix has apparently just been released today (9/8/2010), which should solve the issue.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question