Solved

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

Posted on 2010-09-04
1
1,320 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
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…

832 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