<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">

<channel>
<title>Topic &#x27;Error in macro&#x27; in forum &#x27;Webmasters and Developers&#x27; - dslreports.com</title>
<link>http://www.dslreports.com/forum/Error-in-macro-27958949</link>
<description></description>
<language>en</language>
<pubDate>Thu, 23 May 2013 08:51:50 EDT</pubDate>
<lastBuildDate>Thu, 23 May 2013 08:51:50 EDT</lastBuildDate>

<item>
<title>Error in macro</title>
<link>http://www.dslreports.com/forum/Error-in-macro-27958949</link>
<description><![CDATA[ybrinkmann posted : Hello,<br>I have a database of business management. I have a customer table that has a field saldo_actual. <br>On the other hand, I have a sales form, in which I have a total field, and a button Calculate Total. <br>I want to make a macro that when clicking on the Calculate Total button to add the total saldo_actual field. <br>I assigned the macro to the button event: Mouse button released. Then I write my macro:<br>Sub ActualizarSaldoVentas (Evento)<br>Dim oFrm As Object<br>Dim oCliente As Object<br>Dim oTotal As Object<br>Dim oCon As Object<br>Dim oStat As Object<br>Dim sSQL As String<br>Dim oRes As Object<br>Dim sCliente as String<br>oFrm=Evento.Source.Model.Parent<br>oCliente=oFrm.getByName("cod_cliente")<br>sCliente=oCliente.getCurrentValue()<br>oTotal=oFrm.getByName("total")<br>oCon=ThisDatabaseDocument.CurrentController.ActiveConnection<br>oStat=oCon.CreateStatement<br>sSQL="UPDATE cliente SET cliente.saldo_actual = cliente.saldo_saldo_actual + "& oTotal.getCurrentValue()& " WHERE id_cliente=" & oCliente.getCurrentValue()<br>oRes=oStat.ExecuteQuery(sSQL)<br>End Sub<br>Clicking on the button Calculate total, I get the following error:<br>BASIC runtime error. There was an exception.<br>Type: com.sun.star.container.NoSuchElementException Message:<br>I would appreciate very much a help please.<br>regards,<br>Yessica]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/Error-in-macro-27958949</guid>
<pubDate>Tue, 29 Jan 2013 15:50:55 EDT</pubDate>
</item>

</channel>
</rss>
