Problems with Events

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with Events

Yessica Brinkmann
Hello,
I have a question about the event to which I attach my macro.
I have a sales form and a macro for add a field called total to a
table field called saldo_cliente from a cliente table.
If I assign the macro to the event button mouse released Calculate
Total button will increase the balance each time
the user makes a click on the button and that is not exactly the idea.
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 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. 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).
I would appreciate very much a help with this please.
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Events

Yessica Brinkmann
Hello,
I would ask please if anyone can answer this question because I really need
to implement this functionality.
regards,
Yessica

2013/2/6 Yessica Brinkmann <[hidden email]>

> Hello,
> I have a question about the event to which I attach my macro.
> I have a sales form and a macro for add a field called total to a
> table field called saldo_cliente from a cliente table.
> If I assign the macro to the event button mouse released Calculate
> Total button will increase the balance each time
> the user makes a click on the button and that is not exactly the idea.
> 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 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. 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).
> I would appreciate very much a help with this please.
>
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Events

Andreas Säger
In reply to this post by Yessica Brinkmann
Hi Yessica,

If you really need help with the API, and its database related parts in
particular, I strongly recommend http://forum.openoffice.org where you
find lots of tutorials, snippets, pictures, links, example documents and
the biggest community of OpenOffice experts.

One of the most serious misconceptions about OpenOffice is that Base is
a database application. It is far, far away from that. You can connect
to external databases (please forget the built-in one) and use the
connected database content in ordinary office documents for your serial
letters, bibliographic stuff, labels, for calculation models or pretty
printing of database content. That's almost all you can do with it. All
the rest which may attract some MS Access users is extremely buggy,
underdeveloped, completely insufficiewnt (thus misleading) and not worth
trying.
Input forms are very, very, very simple. If you get the hang of it, you
can do amazing things with input forms without writing a single line of
stupid Basic code (that lingo is totally inappropriate anyway).

For me, Base is the most important component because we hardly use a
single text documents nor spreadsheet that is not connected to some type
of database one way or the other.
I have learned to ignore most of the Base features that had been
introduced in version 2. This way I get the maximum benefit out of the
database connectivity features.

Base tutorials:
http://forum.openoffice.org/en/forum/viewforum.php?f=83

Database examples:
http://forum.openoffice.org/en/forum/viewforum.php?f=100

Base related user questions:
http://forum.openoffice.org/en/forum/viewforum.php?f=13

Focussing on the API:
http://forum.openoffice.org/en/forum/viewforum.php?f=20

Most recently active topics:
http://forum.openoffice.org/en/forum/search.php?search_id=active_topics

See you,
A.S.
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Events

Yessica Brinkmann
Hello,
Thank you very much for your answer.
I am very grateful indeed indicated but unfortunately I can not participate
in this forum.
I am registered with the office open forum in Spanish, as this is my native
language, but unfortunately I had a problem with a person named Mauricio of
that forum. And since then, no one answers any question in the forum. The
issue was that I was asking questions about macros, and he said that he
must first learn all the Base interface, and before that I should not do
macros. To which I replied that the questions arise in a nonlinear order
and not always the natural order of things. And unfortunately I have
commitments to fulfill, and I'm not learning Open Office only because I
like it, but this would be my ideal, unfortunately not my reality. I think
the one bothered by this and all the forum with me, since I never answered
anything. I do not know if they communicate with people of the same forum
in English, but then I joined the forum and no one answered my questions, I
guess I'm marked with a cross in the world of Open Office for this little
problem I had with Mauricio, but at no time was I rude to him or disrespect
him. Just say my humble opinion on the issues.
The truth that I do not like to use Visual Basic macros, if I had my way
not used, but so far I can not understand what you tell me I can do things
apart from them.
What do you recommend?
Regards,
Yessica


2013/2/7 Andreas Säger <[hidden email]>

> Hi Yessica,
>
> If you really need help with the API, and its database related parts in
> particular, I strongly recommend http://forum.openoffice.org where you
> find lots of tutorials, snippets, pictures, links, example documents and
> the biggest community of OpenOffice experts.
>
> One of the most serious misconceptions about OpenOffice is that Base is
> a database application. It is far, far away from that. You can connect
> to external databases (please forget the built-in one) and use the
> connected database content in ordinary office documents for your serial
> letters, bibliographic stuff, labels, for calculation models or pretty
> printing of database content. That's almost all you can do with it. All
> the rest which may attract some MS Access users is extremely buggy,
> underdeveloped, completely insufficiewnt (thus misleading) and not worth
> trying.
> Input forms are very, very, very simple. If you get the hang of it, you
> can do amazing things with input forms without writing a single line of
> stupid Basic code (that lingo is totally inappropriate anyway).
>
> For me, Base is the most important component because we hardly use a
> single text documents nor spreadsheet that is not connected to some type
> of database one way or the other.
> I have learned to ignore most of the Base features that had been
> introduced in version 2. This way I get the maximum benefit out of the
> database connectivity features.
>
> Base tutorials:
> http://forum.openoffice.org/en/forum/viewforum.php?f=83
>
> Database examples:
> http://forum.openoffice.org/en/forum/viewforum.php?f=100
>
> Base related user questions:
> http://forum.openoffice.org/en/forum/viewforum.php?f=13
>
> Focussing on the API:
> http://forum.openoffice.org/en/forum/viewforum.php?f=20
>
> Most recently active topics:
> http://forum.openoffice.org/en/forum/search.php?search_id=active_topics
>
> See you,
> A.S.
>
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Events

Mauricio Baeza
On 02/07/2013 12:49 PM, Yessica Brinkmann wrote:

> Hello,
> Thank you very much for your answer.
> I am very grateful indeed indicated but unfortunately I can not participate
> in this forum.
> I am registered with the office open forum in Spanish, as this is my native
> language, but unfortunately I had a problem with a person named Mauricio of
> that forum. And since then, no one answers any question in the forum. The
> issue was that I was asking questions about macros, and he said that he
> must first learn all the Base interface, and before that I should not do
> macros. To which I replied that the questions arise in a nonlinear order
> and not always the natural order of things. And unfortunately I have
> commitments to fulfill, and I'm not learning Open Office only because I
> like it, but this would be my ideal, unfortunately not my reality. I think
> the one bothered by this and all the forum with me, since I never answered
> anything. I do not know if they communicate with people of the same forum
> in English, but then I joined the forum and no one answered my questions, I
> guess I'm marked with a cross in the world of Open Office for this little
> problem I had with Mauricio, but at no time was I rude to him or disrespect
> him. Just say my humble opinion on the issues.
> The truth that I do not like to use Visual Basic macros, if I had my way
> not used, but so far I can not understand what you tell me I can do things
> apart from them.
> What do you recommend?
> Regards,
> Yessica
>
>
> 2013/2/7 Andreas Säger <[hidden email]>
>

Hello Yessica ...

These telling words that can get out of context. I do not see the
problem you mention me, you can see it here:
http://forum.openoffice.org/es/forum/viewtopic.php?f=31&t=7741

Any opinions you have, you can do it publicly in the forum.

I answer here as in the Spanish forum is: if someone wants to learn to
make macros in AOO / Libo, first has to be an average user / advanced
tools itself, in your case, you have to master best Base

Regards


--
__________________________________________________
Todo lo que no podemos dar nos posee... Andre Gide
universolibre.org

Reply | Threaded
Open this post in threaded view
|

Re: Problems with Events

Yessica Brinkmann
Hi Mauricio,
How strange that now answer me so fast!
Sorry, but I do not think you have any right to tell me that when I or not
learn one thing or another, let alone refuse assistance in all forums just
because you decide it's not my time to learn something. I can learn what I
want when I want. Who you think you are? God? I think anyone reading this
thread you indicate you will realize that what happened was exactly what I
said. My intention was not to take things out of context, but simply to
summarize the issue, not to write all our conversation or put the link
directly.
Well, since you have decided to get a cross over my head worldwide Open
Office for a simple difference of opinion with you, do not know why, it's
because I had some reason ... I guess I will not ask anything else in any
forum Open Office in the future and ready, I'll manage somehow myself to
finish my project that unfortunately did with Open Office.  And obviously
never will use Open Office Base in the future.
My only mistake here was to use Open Office for my project instead of
Access, I see that if using Access would have ended long ago, mainly
because many people do know Access and no precisely believe gods. No wonder
everyone uses Microsoft and not Open Office, now I understand.
If you can be bothered to reply back to this email but I will not say
anything more. It ends here my relationship with the world Open Office, and
I realize they are totally authoritarian, they put a cross to give just an
opinion.
Regards and good riddance.
Yessica Brinkmann

2013/2/7 Mauricio Baeza <[hidden email]>

> On 02/07/2013 12:49 PM, Yessica Brinkmann wrote:
>
>> Hello,
>> Thank you very much for your answer.
>> I am very grateful indeed indicated but unfortunately I can not
>> participate
>> in this forum.
>> I am registered with the office open forum in Spanish, as this is my
>> native
>> language, but unfortunately I had a problem with a person named Mauricio
>> of
>> that forum. And since then, no one answers any question in the forum. The
>> issue was that I was asking questions about macros, and he said that he
>> must first learn all the Base interface, and before that I should not do
>> macros. To which I replied that the questions arise in a nonlinear order
>> and not always the natural order of things. And unfortunately I have
>> commitments to fulfill, and I'm not learning Open Office only because I
>> like it, but this would be my ideal, unfortunately not my reality. I think
>> the one bothered by this and all the forum with me, since I never answered
>> anything. I do not know if they communicate with people of the same forum
>> in English, but then I joined the forum and no one answered my questions,
>> I
>> guess I'm marked with a cross in the world of Open Office for this little
>> problem I had with Mauricio, but at no time was I rude to him or
>> disrespect
>> him. Just say my humble opinion on the issues.
>> The truth that I do not like to use Visual Basic macros, if I had my way
>> not used, but so far I can not understand what you tell me I can do things
>> apart from them.
>> What do you recommend?
>> Regards,
>> Yessica
>>
>>
>> 2013/2/7 Andreas Säger <[hidden email]>
>>
>>
> Hello Yessica ...
>
> These telling words that can get out of context. I do not see the problem
> you mention me, you can see it here: http://forum.openoffice.org/**
> es/forum/viewtopic.php?f=31&t=**7741<http://forum.openoffice.org/es/forum/viewtopic.php?f=31&t=7741>
>
> Any opinions you have, you can do it publicly in the forum.
>
> I answer here as in the Spanish forum is: if someone wants to learn to
> make macros in AOO / Libo, first has to be an average user / advanced tools
> itself, in your case, you have to master best Base
>
> Regards
>
>
> --
> ______________________________**____________________
> Todo lo que no podemos dar nos posee... Andre Gide
> universolibre.org
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Events

Mauricio Baeza
On 02/07/2013 01:32 PM, Yessica Brinkmann wrote:

> Hi Mauricio,
> How strange that now answer me so fast!
> Sorry, but I do not think you have any right to tell me that when I or not
> learn one thing or another, let alone refuse assistance in all forums just
> because you decide it's not my time to learn something. I can learn what I
> want when I want. Who you think you are? God? I think anyone reading this
> thread you indicate you will realize that what happened was exactly what I
> said. My intention was not to take things out of context, but simply to
> summarize the issue, not to write all our conversation or put the link
> directly.
> Well, since you have decided to get a cross over my head worldwide Open
> Office for a simple difference of opinion with you, do not know why, it's
> because I had some reason ... I guess I will not ask anything else in any
> forum Open Office in the future and ready, I'll manage somehow myself to
> finish my project that unfortunately did with Open Office.  And obviously
> never will use Open Office Base in the future.
> My only mistake here was to use Open Office for my project instead of
> Access, I see that if using Access would have ended long ago, mainly
> because many people do know Access and no precisely believe gods. No wonder
> everyone uses Microsoft and not Open Office, now I understand.
> If you can be bothered to reply back to this email but I will not say
> anything more. It ends here my relationship with the world Open Office, and
> I realize they are totally authoritarian, they put a cross to give just an
> opinion.
> Regards and good riddance.
> Yessica Brinkmann


No comments ... good luck


--
__________________________________________________
Todo lo que no podemos dar nos posee... Andre Gide
universolibre.org

Reply | Threaded
Open this post in threaded view
|

Re: Problems with Events

Andreas Säger
In reply to this post by Yessica Brinkmann
The difference between MS Access and Base amounts to several millions of
Dollars and more than one decade of development time.

Once you got used to MS Access, it is rather unlikely that you will ever
be able to work with any other set of database utilities.

I wish the AOO team had the balls to remove all the experimental trash
while keeping bare important database connectivity for the pros.
Since 2006 the whole concept of Base with the embedded HSQLDB and
wizards is proven to be completely wrong, wrong, wrong.
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Events

Mauricio Baeza
On 02/07/2013 02:18 PM, Andreas Säger wrote:

> The difference between MS Access and Base amounts to several millions of
> Dollars and more than one decade of development time.
>
> Once you got used to MS Access, it is rather unlikely that you will ever
> be able to work with any other set of database utilities.
>
> I wish the AOO team had the balls to remove all the experimental trash
> while keeping bare important database connectivity for the pros.
> Since 2006 the whole concept of Base with the embedded HSQLDB and
> wizards is proven to be completely wrong, wrong, wrong.
>

+100


--
__________________________________________________
Todo lo que no podemos dar nos posee... Andre Gide
universolibre.org

Reply | Threaded
Open this post in threaded view
|

Re: Problems with Events

Andrea Pescetti-2
In reply to this post by Yessica Brinkmann
Yessica Brinkmann wrote:
> I guess I'm marked with a cross in the world of Open Office for this little
> problem I had with Mauricio

Yessica, you are really guessing wrong. OpenOffice is too big for any
personal problems to prevail: nobody can "mark" anyone as a person whose
questions are disregarded. You already got plenty of friendly advice on
the dev mailing list in the last few days and you got some advice here
too: it just takes time, we are all volunteers and it is normal that it
takes a few days before questions, especially complex questions like
yours, are answered. If they aren't, allow a week or so and gently reply
to your message saying you didn't get an answer, and rest assured that
people won't deliberately ignore a sender, and that nobody has the power
to impose that behavior on other members.

> It ends here my relationship with the world Open Office, and
> I realize they are totally authoritarian, they put a cross to give just an
> opinion.

Everybody is free to leave a mailing list. You are doing this based on a
misconception, and nobody wrote anything bad against you on this list.
You are surely welcome to come back any time! (And no, I don't know how
to answer your technical questions, sorry).

Regards,
   Andrea.
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Events

Mauricio Baeza
On 02/07/2013 03:08 PM, Andrea Pescetti wrote:

> Yessica Brinkmann wrote:
>> I guess I'm marked with a cross in the world of Open Office for this
>> little
>> problem I had with Mauricio
>
> Yessica, you are really guessing wrong. OpenOffice is too big for any
> personal problems to prevail: nobody can "mark" anyone as a person
> whose questions are disregarded. You already got plenty of friendly
> advice on the dev mailing list in the last few days and you got some
> advice here too: it just takes time, we are all volunteers and it is
> normal that it takes a few days before questions, especially complex
> questions like yours, are answered. If they aren't, allow a week or so
> and gently reply to your message saying you didn't get an answer, and
> rest assured that people won't deliberately ignore a sender, and that
> nobody has the power to impose that behavior on other members.
>
>> It ends here my relationship with the world Open Office, and
>> I realize they are totally authoritarian, they put a cross to give
>> just an
>> opinion.
>
> Everybody is free to leave a mailing list. You are doing this based on
> a misconception, and nobody wrote anything bad against you on this
> list. You are surely welcome to come back any time! (And no, I don't
> know how to answer your technical questions, sorry).
>
> Regards,
>   Andrea.
>


+100


--
__________________________________________________
Todo lo que no podemos dar nos posee... Andre Gide
universolibre.org