Greetings all. Thank you for taking time to read this and for any help you can give.
I am very rusty in database design and am building one as a favor for a long time friend. He needs what amounts to an address book on steroids. I've got the main table done and am designing a form to enter / display the data.
He will have need to search the records by area code or by zip code. I've written the queries which prompt the user to enter the search criteria and then return the relevant records. What is stumping me is making those queries available from the main form. I thought I could just stick a button on the form, assign a query to it and that'd be that. However, I am stumped as to how one goes about assigning a query to a button if it is at all possible.
What I want to do is make it so that if he needs to search the records for all those who are in area code 212, he clicks a button, gets prompted to enter the area code, clicks ok and has the data presented to him to page through. How do I assign SELECT * FROM "tbl_vendors" WHERE "Office Phone" LIKE :Area_Code_Percent to a button? Is there some other better solution that I am overlooking?
I am working in OOo 3.0.0 build 9358 in Arch Linux.
Thanks again for your time!
[Solved] Query to a push button in a form possible?
[Solved] Query to a push button in a form possible?
Last edited by Rumor on Sat Jan 17, 2009 8:45 pm, edited 1 time in total.
OOo 3.0.X on Linux-Other
Re: Is assigning a query to a push button in a form possible?
All the form design tools on one toolbar to create forms, subforms, lists and nested lists for all kinds of relations and referencial integrity.
1. The built-in form based filter where a user can compose arbitrary complex filters.
2. Forms and controls can be bound in several ways, so a helper-table stores the filter criteria (which can also help to load another form or report based on the same criteria): [Solved] SQL criteria from a Combo Box value
3. Quite a lot of macro-code has been written to do the trick with unbound combo/list boxes.
Just another example of a bound combo-filter with pictures: http://user.services.openoffice.org/en/ ... hp?id=3371
1. The built-in form based filter where a user can compose arbitrary complex filters.
2. Forms and controls can be bound in several ways, so a helper-table stores the filter criteria (which can also help to load another form or report based on the same criteria): [Solved] SQL criteria from a Combo Box value
3. Quite a lot of macro-code has been written to do the trick with unbound combo/list boxes.
4. You can bind your form to such parameter query and add a button with property "Action" = "Refresh Form". You'll be prompted for input then.SELECT * FROM "tbl_vendors" WHERE "Office Phone" LIKE :Area_Code_Percent
Just another example of a bound combo-filter with pictures: http://user.services.openoffice.org/en/ ... hp?id=3371
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: [Solved] Query to a push button in a form possible?
Villeroy,
Thank you for the links and information. I was able to resolve the matter with your help.
Thank you for the links and information. I was able to resolve the matter with your help.