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 <and...@pitonyak.org>

>
> 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<http://www.pitonyak.org/AndrewMacro.odt>
> Info:  http://www.pitonyak.org/oo.php
>
>

Reply via email to