Solved

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

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
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…
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

943 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now