Re: Error in macro.

2013-02-03 Thread Yessica Brinkmann
Hello, Thank you very much for all the help! And for all the patience! My macro works! I had an installer of Open Office 3.4.0 and wonder but that version without any problems I could modify the default saldo_actual field from the Customer table. Regards, Yessica 2013/2/3 Ariel Constenla-Haile >

Re: Error in macro.

2013-02-03 Thread Ariel Constenla-Haile
Hi Yessica, On Sun, Feb 03, 2013 at 02:31:49PM -0300, Yessica Brinkmann wrote: > Hello, sorry, I totally understand what you're saying and just tried to do > so. As I had said in my previous mail, when I try to change the default > saldo_actual field in the editing area of the Customer table, do n

Re: Error in macro.

2013-02-03 Thread Yessica Brinkmann
Hello, sorry, I totally understand what you're saying and just tried to do so. As I had said in my previous mail, when I try to change the default saldo_actual field in the editing area of the Customer table, do not let me Base. You tell me: - Edit the table "customer": right click on the "custome

Re: Error in macro.

2013-02-03 Thread Ariel Constenla-Haile
Hi Yessica, On Sun, Feb 03, 2013 at 02:58:58AM -0300, Yessica Brinkmann wrote: > Hello, > Excuse me please if I do a silly question. But the truth is that I could > not change the default value of saldo_actual field from the cliente table. > As much as I put in value If required, I deleted all rec

Re: Error in macro.

2013-02-03 Thread Fernand Vanrie
Yessica , its a property off the cliente fields table, put 0 for default Hello, thank you very much for your answers. I created a macro as you show me, and it works: Sub modificacion oCon=ThisDatabaseDocument.CurrentController.ActiveConnection oStat=oCon.CreateStatement sSQL = "UPDATE ""cliente

Re: Error in macro.

2013-02-03 Thread Yessica Brinkmann
Hello, thank you very much for your answers. I created a macro as you show me, and it works: Sub modificacion oCon=ThisDatabaseDocument.CurrentController.ActiveConnection oStat=oCon.CreateStatement sSQL = "UPDATE ""cliente"" "& "SET ""cliente"".""saldo_actual"" =" & " ""cliente"".""saldo_actual"" +

Re: Error in macro.

2013-02-03 Thread Fernand Vanrie
i opened your base document , opened to edit your cliente table, close and run your macro now your macro works :-) Op 03/02/2013 13:38, Fernand Vanrie schreef: Op 02/02/2013 11:20, Yessica Brinkmann schreef: Hello, Yes, I write: SELECT cliente.saldo_actual FROM cliente WHERE id_cliente=0 an

Re: Error in macro.

2013-02-03 Thread Fernand Vanrie
Op 02/02/2013 11:20, Yessica Brinkmann schreef: Hello, Yes, I write: SELECT cliente.saldo_actual FROM cliente WHERE id_cliente=0 and it works. It say: Command executed successfully. The column name is saldo_actual , so I wrote in my last version of the macro, which is in my previous mail. If its

Re: Error in macro.

2013-02-02 Thread Yessica Brinkmann
Hello, Excuse me please if I do a silly question. But the truth is that I could not change the default value of saldo_actual field from the cliente table. As much as I put in value If required, I deleted all records from the cliente table and have even removed all relationships with other tables, j

Re: Error in macro.

2013-02-02 Thread Ariel Constenla-Haile
On Sat, Feb 02, 2013 at 11:39:23PM -0300, Yessica Brinkmann wrote: > Thank you for the answer! I put my database on mediafire, the link is as > follows: > http://www.mediafire.com/?bhzhr0zzkcz1iue > The macro that I have problem is associated with the button Calcular Total > on Ventas form. On a

Re: Error in macro.

2013-02-02 Thread Yessica Brinkmann
Thank you for the answer! I put my database on mediafire, the link is as follows: http://www.mediafire.com/?bhzhr0zzkcz1iue The macro that I have problem is associated with the button Calcular Total on Ventas form. Regards, Yessica 2013/2/2 Ariel Constenla-Haile > Hi Yessica, > > On Sat, Feb 02

Re: Error in macro.

2013-02-02 Thread Ariel Constenla-Haile
Hi Yessica, On Sat, Feb 02, 2013 at 03:04:14AM -0300, Yessica Brinkmann wrote: > Hello, > I wanted to ask if I can please help with this issue. Is that really need > to implement this functionality for my database. The macro has no errors > but UPDATE is not performed in the customer table. I do n

Re: Error in macro.

2013-02-02 Thread Yessica Brinkmann
Hello, Yes, I write: SELECT cliente.saldo_actual FROM cliente WHERE id_cliente=0 and it works. It say: Command executed successfully. The column name is saldo_actual , so I wrote in my last version of the macro, which is in my previous mail. Regards, Yessica 2013/2/2 Fernand Vanrie > Op 02/02/20

Re: Error in macro.

2013-02-02 Thread Fernand Vanrie
Op 02/02/2013 07:04, Yessica Brinkmann schreef: Hello, I wanted to ask if I can please help with this issue. Is that really need to implement this functionality for my database. The macro has no errors but UPDATE is not performed in the customer table. I do not know if you owe the event in which

Re: Error in macro.

2013-02-01 Thread Yessica Brinkmann
Hello, I wanted to ask if I can please help with this issue. Is that really need to implement this functionality for my database. The macro has no errors but UPDATE is not performed in the customer table. I do not know if you owe the event in which I am putting my macro, event currently in the Mous

Re: Error in macro.

2013-02-01 Thread Yessica Brinkmann
Hello, I think maybe I should assign my macro to another event, perhaps one associated with the form to work, I do not know, my idea is just. Tempted now assigned to mouse button released event of a button called Calculate Total. regards, Yessica 2013/2/1 Yessica Brinkmann > Hello, > Thank you v

Re: Error in macro.

2013-02-01 Thread Yessica Brinkmann
Hello, Thank you very much for the reply. Sorry, did not know that I should not put attachments. Now I have no errors in the macro, and I used the SQL UPDATE indicated. Just do not know why but UPDATE fails. So, when I check the table, I do not see the value of the changed field. I refreshed the ta

Re: Error in macro.

2013-02-01 Thread Fernand Vanrie
Ariel, Yessica, with OObase database, table and field names are case sensitive, their is no need to quote if: tables are lowercase and fieldnames uppercase. if quotes are used, then leave the dots out of the quotes sSQL= "SELECT ""mybase"".""cliente"".""saldo_saldo_actual"" WHERE...

Re: Error in macro.

2013-02-01 Thread Ariel Constenla-Haile
Hi Yessica, On Fri, Feb 01, 2013 at 09:54:31AM -0300, Yessica Brinkmann wrote: > Hello, thank you very much for the reply. The table name is cliente, as > shown in the print screen attached to my previous mail. attachments are stripped in this mailing list. > Actually I tried already to put quo

Re: Error in macro.

2013-02-01 Thread Yessica Brinkmann
Hello, thank you very much for the reply. The table name is cliente, as shown in the print screen attached to my previous mail. Actually I tried already to put quotes in many ways to the table names and columns but never works for me. Regards, Yessica 2013/2/1 Ariel Constenla-Haile > On Thu, Jan

Re: Error in macro.

2013-02-01 Thread Ariel Constenla-Haile
On Thu, Jan 31, 2013 at 08:01:22PM -0300, Yessica Brinkmann wrote: > Hi, thanks for your answer. > Now I advanced. > I print the value of the client code correctly. > Only now I have another error, tells me that the Customer table does not > exist or something like this: > Basic runtime error. Ther

Re: Error in macro.

2013-02-01 Thread Yessica Brinkmann
Hello, Thank you very much for your answer! I have a customer table in my database. Deputy print screen the list of tables in my database. I do not know if I'll be wrong but I think the problem is in the quotes, in the way that I am using. Actually I tried to modify the quotes of different ways but

Re: Error in macro.

2013-02-01 Thread Fernand Vanrie
On 1/02/2013 0:01, Yessica Brinkmann wrote: Hi, thanks for your answer. Now I advanced. I print the value of the client code correctly. Only now I have another error, tells me that the Customer table does not exist or something like this: Basic runtime error. There was an exception. Type: com.sun

Re: Error in macro.

2013-01-31 Thread Yessica Brinkmann
Hi, thanks for your answer. Now I advanced. I print the value of the client code correctly. Only now I have another error, tells me that the Customer table does not exist or something like this: Basic runtime error. There was an exception. Type: com.sun.star.sdbc.SQLException. Message: Table not fo

Re: Error in macro.

2013-01-31 Thread Fernand Vanrie
On 31/01/2013 13:33, Yessica Brinkmann wrote: Hello, Thank you very much for your answer. Sorry but I do not understand the truth indicated. What I want to do in my macro, as you can see in my first mail is an SQL UPDATE. ok you have a form, you fill this for with data comming from a "select"

Re: Error in macro.

2013-01-31 Thread Yessica Brinkmann
Hello, Thank you very much for your answer. Sorry but I do not understand the truth indicated. What I want to do in my macro, as you can see in my first mail is an SQL UPDATE. I can not find the client code for the name either, if that's what you suggest because this name is not necessarily unique,

Re: Error in macro.

2013-01-31 Thread Fernand Vanrie
Yessica, Hello, Yes, my controls now have the same name as the one I use to call the macro. Initially that was my mistake but I spent those mistakes. Now my problem is that I describe in my previous mail, on the subject of the combo box and customer_id and name. There is a key value associated wi

Re: Error in macro.

2013-01-30 Thread Yessica Brinkmann
Hello, Yes, my controls now have the same name as the one I use to call the macro. Initially that was my mistake but I spent those mistakes. Now my problem is that I describe in my previous mail, on the subject of the combo box and customer_id and name. There is a key value associated with my combo

Re: Error in macro.

2013-01-30 Thread Yessica Brinkmann
Hello, Thank you very much for your answer! There is a key value associated with my combo box. On the Data tab of the Properties List, Contents List, I have the following SQL statement: SELECT "name", "customer_id" FROM "customer" My problem is that I do not know how to get the customer_id from the

Re: Error in macro.

2013-01-30 Thread Fernand Vanrie
Yessica nono , just check if the name of your controls are identical to what you call with "getbyname" (check uppercase, lower) greetz Fernand Hello, I think I can do this with string functions Left and Split but I do not know which is the separator for the ComboBox, for separating the

Re: Error in macro.

2013-01-30 Thread Andrew Douglas Pitonyak
Hopefully someone more in the know than I will answer, but, it is not clear to me that I have sufficient information to answer your question. I assume that your combo box is NOT multi-valued (don't even know if that is supported I have not looked at these in a very long time). is there

Re: Error in macro.

2013-01-30 Thread Yessica Brinkmann
Hello, Thank you very much for your answer! Now I understand what you're saying. I changed my macro, now looks like this: Sub ActualizarSaldoVentas (Evento) Dim oFrm As Object Dim oCliente As Object Dim oTotal As Object Dim oCon As Object Dim oStat As Object Dim sSQL As String Dim oRes As Object Di

Re: Error in macro.

2013-01-30 Thread Andrew Douglas Pitonyak
I think that AndrewBase.odt provides a routine that can find a control from its name It is not efficient, but it works. To get things by name, you must know where they live. You have named forms and controls, so, I think that you can use the Forms navigator (or something like that) to see

Re: Error in macro.

2013-01-30 Thread Yessica Brinkmann
Hello, I think I can do this with string functions Left and Split but I do not know which is the separator for the ComboBox, for separating the code from the name. Much appreciate an answer please. regards, Yessica 2013/1/30 Yessica Brinkmann > Hello, > Thank you for the answers! > When I replac

Re: Error in macro.

2013-01-30 Thread Yessica Brinkmann
Hello, Thank you for the answers! When I replaced the lines containing "getByName" for something as indicated prints a message saying: "Can not find cod_cliente". I think this is because it is a field cod_cliente type drop-down list box and i should get the id of the customer through a cut chain or

Re: Error in macro.

2013-01-30 Thread Andrew Douglas Pitonyak
Which line gives the error? If you change all lines containing "getByName" with something like If oFrm.hasByName("cod_cliente") Then oCliente=oFrm.getByName("cod_cliente") Else Print "Cannot find cod_cliente" Exit Sub End If What happens? On 01/30/2013 04:56 AM, Yessica Brinkmann wrote:

Re: Error in macro.

2013-01-30 Thread Fernand Vanrie
Yessica , hard to sea, but the error must open the basic ID and higlight the place off the error, "container.NoSuchElementException" >> probably a typo in the name of one of the fieldnames ? called by the "getbyname" hope it helps Fernand Hello, I have a database of business management.