OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

[SOLVED] CheckBox in Subform_Grid not firing events

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
Tudor
General User
General User


Joined: 05 Feb 2009
Posts: 15
Location: Bucharest, Romania

PostPosted: Wed Mar 04, 2009 10:55 am    Post subject: [SOLVED] CheckBox in Subform_Grid not firing events Reply with quote

I have a table containing 3 boolean fields. I put this table in a Subform_Grid.
For every column I put a macro on "Before Update Event" to evaluate any changes made by the user before writing it to the table. Columns of other types then CheckBox are firing the "Before Update Event" correct and the Macro is working.

The CheckBox Columns (corresponding to the Boolean fields) have no "Before Update Event". I tried link "When Initiating Event" and "Item Status Changed Event" to the Macro, but none of them are firing when I changed the status of the CheckBox on the grid, with mouse click or with keyboard.

Please, help me find a way to launch a Macro when the user change the status of the CheckBox in the grid.

Note: If I set a CheckBox outside the grid (in the Main Form) it works well, firing "Item Status Changed" every time the user change the checkbox status.

I have OOo Base 3.0 on XP.


Last edited by Tudor on Mon Mar 09, 2009 11:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
Tudor
General User
General User


Joined: 05 Feb 2009
Posts: 15
Location: Bucharest, Romania

PostPosted: Sun Mar 08, 2009 11:15 pm    Post subject: Reply with quote

Maybe I wasn't clear for what I need help.
I try to find out what event is triggered when I check or uncheck a CheckBox in a SubForm_Grid. I need this in order to be able to run a macro when a change on a CheckBox field is commited.
Any hint or ideas for work-around is much appreciated.
Thanks.
Back to top
View user's profile Send private message
brian4m
OOo Enthusiast
OOo Enthusiast


Joined: 13 Feb 2006
Posts: 162
Location: Bath, England

PostPosted: Mon Mar 09, 2009 11:37 am    Post subject: Check box in a subform grid Reply with quote

I also had a problem getting a macro to “fire” when the contents of Check box, in a grid, was changed. Part of the problem was knowing what was the relevant value. When the box is blank the value is 0, when there is a grey tick is it 2 and a solid tick has a value of 1.

My solution in is a database at https://sites.google.com/site/brian4mswebsite/book-dealer .The form you need to look at is the one called Invoice. In the bottom part of the form is “Books available for sale”. Click check box called Sold and the book is transferred to the “Invoice details” grid above.

The event is Item status changed.

Brian
Back to top
View user's profile Send private message
Tudor
General User
General User


Joined: 05 Feb 2009
Posts: 15
Location: Bucharest, Romania

PostPosted: Mon Mar 09, 2009 11:20 pm    Post subject: Reply with quote

Thanks Brian! Very Happy
I was stuck on this problem for a week... and the solution was so simple.

To be clear for others that will face the same problem:

For a CheckBox Control inserted in a Grid (in a Subform_Grid as a CheckBox Column) to fire the "Item Status Changed" event, you have to fill the Reference Values for (on) and (off). They are Empty (Null) by default. In the same way as Brian did, I put 1 for (on) and 0 (zero) for (off). After that change, the "Item Status Changed" is fired correctly every time the user change the status of the CheckBox.

Thanks again Brian! Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group