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

Reply via email to