Return-Path: X-Original-To: apmail-openoffice-dev-archive@www.apache.org Delivered-To: apmail-openoffice-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E300CE59F for ; Wed, 6 Feb 2013 03:53:38 +0000 (UTC) Received: (qmail 7697 invoked by uid 500); 6 Feb 2013 03:53:38 -0000 Delivered-To: apmail-openoffice-dev-archive@openoffice.apache.org Received: (qmail 7343 invoked by uid 500); 6 Feb 2013 03:53:37 -0000 Mailing-List: contact dev-help@openoffice.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openoffice.apache.org Delivered-To: mailing list dev@openoffice.apache.org Received: (qmail 7282 invoked by uid 99); 6 Feb 2013 03:53:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2013 03:53:35 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yessica.brinkmann@gmail.com designates 209.85.212.174 as permitted sender) Received: from [209.85.212.174] (HELO mail-wi0-f174.google.com) (209.85.212.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2013 03:53:27 +0000 Received: by mail-wi0-f174.google.com with SMTP id hi8so4571804wib.7 for ; Tue, 05 Feb 2013 19:53:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=/CYiM/nQ5xn5x+GgH7yM/dVeAMb4xk6JrHJay/DkaHg=; b=U6g7gydQEAfkB8fH3pJr3f+ZO7Cvs6j26N65/T7k5XGbDhm6H5B+V6izPpxsI/v61d 603vI6F3TtSvMEiJtttB7g88FRpWMhCCog1/fdqOu/vRFqnKXWx03GVCd8YIcDu2qKds IdVWizKUKuvGBNcW0hywhqhxCvOMaRhxuPLsmlMoLhPPo36ntpobsqMnC3uR/HLdLXcg zsJslbmrVpxBzjX6GycKYNF9YvO7s7bAXEq8f38Gk0LkL+JVRRzAIsNlTsV0cv2Gqa+m m5hZV+0ATby3CfDm53vTj64gyQk74WzCIEkQklogKXwABrE4FNqsa+hmtOA5awHeFONg Xueg== X-Received: by 10.194.21.70 with SMTP id t6mr46726422wje.42.1360122787481; Tue, 05 Feb 2013 19:53:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.91.237 with HTTP; Tue, 5 Feb 2013 19:52:47 -0800 (PST) In-Reply-To: <511190C3.6050409@pitonyak.org> References: <511190C3.6050409@pitonyak.org> From: Yessica Brinkmann Date: Wed, 6 Feb 2013 00:52:47 -0300 Message-ID: Subject: Re: Problems with Events To: andrew@pitonyak.org Cc: dev@openoffice.apache.org Content-Type: multipart/alternative; boundary=047d7b5d3ef69949a404d5064396 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d3ef69949a404d5064396 Content-Type: text/plain; charset=ISO-8859-1 Hello. Very thanks for your response. I just do not want that any time the macro is triggered, for example at the press of a key. I wanted to shoot only once, such as the data stored. Spend that otherwise will be adding double, triple, etc.. the total amount ... The issue is that in my database are on the one hand Sales and on the other hand Payments Sales, in two different forms, whose tables are not related to each other because there is in fact a relationship between them. In terms of sales, what I want to do is take the field from the Customer table saldo_actual current balance of the customer is always consistent, as recorded total sales in the form of sales for a given customer. That is, as I understand it, if you add a new record, for example, (in the form of sales) should add value to the field saldo_actual. If you change the record, the question is whether to subtract or add the field. And if you delete a record (in the form of sales) should be subtracted saldo_actual field value in order to always keep consistent with the actual values. This field is an internal field saldo_actual only I use to work with the database. It is not loaded by the user at any time. Then there is the form of payments of sales, which is independent of sales, which also works with saldo_actual field. I'm also doing the macro to this form and I have just a mistake, but did not want to post two things at once. In this form of Payments Sales, the idea is that when you select a customer in a combo box display the current balance thereof (as indicated at the time in the field saldo_actual), and by the amount written in the form of payments Sales, have a button to calculate the new balance and modify the registry saldo_actual customer table, (I'm also doing the macro to this button but still not working - I understand this macro also probably have to have the same schema of the first, as to have 3 macros that trigger to insert, modify and delete. This is in order to always keep consistent the saldo_actual field with the actual values. ). This is because I need to know on the one hand, the overall balance of the customer and also the history of the different balances that was having this (this is for a later generation of reports). This is to clarify the flow of what I do. I hope there is further complicated my question. Very thanks. Regards, Yessica 2013/2/5 Andrew Douglas Pitonyak > > On 02/05/2013 04:06 PM, Yessica Brinkmann wrote: > >> Hello, >> As you remember I had many problems to run a macro. Now I have a question >> about the event to which I attach my macro. If I assign the macro to the >> event button mouse released >> > > I usually associate to initiating, or executing, (or what ever they call > it now), so that it will also be called if there is a keypress and you only > need to hook one event. > > > Calculate Total button will increase the >> balance each time the user makes a click on the button and that is not >> exactly the idea. I thought now my macro to assign one of the following >> events: After Before resetting or shipping, but from the sales form, >> rather >> than buttons or specific fields. >> The idea is that only increase the saldo_actual once, to save the record. >> On the other hand, should only be added the total to the saldo_actual >> field in the table cliente if it is a new record, but if it is a >> modification, it should analyze the situation and as the case add or >> subtract the saldo_actual. >> While if it is a deletion, should subtract the total saldo_actual field. >> So I understand that I have to do actually 3 macros, right? One for new >> records, one for >> modifications and one for deletions. >> What is not clear for me is that events should put macros for this scheme >> work. >> I would appreciate very much a help with this please. >> regards, >> Yessica >> >> Sorry, I had difficulty following your question. First, I don't think > that the macro will understand what you will do with a record. I don't > think that there is an event that tells you that a record is about to be > deleted, inserted, or modified. > > In other words, it is difficult to answer without understanding the flow > of what you want to do. > > -- > Andrew Pitonyak > My Macro Document: http://www.pitonyak.org/**AndrewMacro.odt > Info: http://www.pitonyak.org/oo.php > > --047d7b5d3ef69949a404d5064396--