Hi everyone,
I am curious if I can copy the entire last record in a table with a macro. I'm working with web forms and Sharepoint so I can't use vba or append queries (a total pain). The system limits me to using macros which is pretty inflexible (In addition, its not the full suite of macro options as in the client macros.) I've tried doing a "for" loop, matching the last pkey with the attribute in the field and importing each attribute over in a data macro but it puts the entire site in an invalid state. I'm including the code below (its in XML format):
I cut a bit of the repetitive sections out, but the structure is the same. Can anyone help or suggest another way to do this?
I'm using: Access 2010 w/SharePoint Server 2010
I am curious if I can copy the entire last record in a table with a macro. I'm working with web forms and Sharepoint so I can't use vba or append queries (a total pain). The system limits me to using macros which is pretty inflexible (In addition, its not the full suite of macro options as in the client macros.) I've tried doing a "for" loop, matching the last pkey with the attribute in the field and importing each attribute over in a data macro but it puts the entire site in an invalid state. I'm including the code below (its in XML format):
Code:
<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<DataMacros xmlns=""><DataMacro Name="eqAdd">
<Parameters>
<Parameter Name="maxCC" Description="Max ID of [CC]"/>
</Parameters>
<Statements>
<ForEachRecord>
<Data Alias="aEQ">
<Reference>equipment</Reference>
<WhereCondition>[equipment].[id]=[maxCC]-1</WhereCondition>
</Data>
<Statements>
<CreateRecord>
<Data>
<Reference>equipment</Reference>
</Data>
<Statements>
<Action Name="SetField">
<Argument Name="Field">dt</Argument>
<Argument Name="Value">[aEQ].[dt]</Argument>
</Action>
</Statements>
</CreateRecord>
</Statements>
</ForEachRecord>
</Statements>
</DataMacro>
</DataMacros>
I'm using: Access 2010 w/SharePoint Server 2010