Page 1 of 1

[Solved] Filter Base table with buttons on form

Posted: Thu Nov 02, 2017 3:10 am
by flyyboyy
Hello, all -- first time poster. . . I've searched for weeks here and elsewhere for what seems should be an easy solution. I have a table of 3000+ records that I would like to filter with push buttons placed on a form -- each button running a different query. I see that buttons are intrinsically designed to navigate through the table and/or edit a displayed record (not what I'm after), so I assume it would need to be done with a macro called when pushing the button, i.e. an SQL query. I have had no success so far; I've studied BASIC Programming Guide and Pitonyak's guide but still missing it. I understand that there is SO much that I don't know, but have not found the resources I need to learn.

So, two questions:
1 - (Specifically) how to build a macro to filter a table when pressing a button on a form, and
2 - (More broadly) where else can I go for more documentation to learn how to implement the tools included in OO Basic

Thanks -- flyyboyy

Re: Filter Base table with buttons on form

Posted: Thu Nov 02, 2017 5:01 pm
by UnklDonald418
I found the book “Database Programming with OpenOffice.org Base & Basic” by Roberto Benitez to be helpful.
http://www.baseprogramming.com/
That said, I'm not sure you need a macro. Look at
viewtopic.php?f=100&t=42845
scroll to the bottom and download "LIKE_user_input_filter.odb" for filtering examples without macros.