4 Replies Latest reply: Jan 4, 2012 8:14 AM by Nicolas Stefaniuk RSS

    DynamicUpdateCommand

    Christopher Murrell

      Hello,

       

      Sorry if this has been asked before but I am having a problem with the DynamicUpdateCommand,

       

      I am trying to update a field called value to it's value + 1, eventually it will be more complicated than this but I cannot get even this basic operation to work.

      My code inside a macro is:

       

      sub Update

      set result1 = ActiveDocument.DynamicUpdateCommand ("UPDATE * SET Value = Value + 1 Where IDVal = 'CC_145'")

      End Sub

       

      this does nothing, however if I remove the Value + parts it does update to 1:

       

      sub Update

      set result1 = ActiveDocument.DynamicUpdateCommand ("UPDATE * SET Value = 1 Where IDVal = 'CC_145'")

      End Sub

       

       

      The above does work does not achieve what we need.

       

      Any help would be great!

      Many Thanks,
      Chris