[Solved] Form filter applied through 26 alphabet buttons
[Solved] Form filter applied through 26 alphabet buttons
Years ago I used a database (access) form that filtered its data triggered by one of 26 alphabet buttons the user selected on the main form. Now things have changed a LOT and while some of these forum answers come close, I can't quite bridge the knowledge gap to the present in OOo base connecting to an external HSQLDB. I can apply the field filter manually to get what I want, but I want to present the user a clickable option. Setting the "action" (Open document/web page) and "URL" (uno:FormController/filter) properties of a button comes tantalizingly close but doesn't complete the task. The filter will select the first letter (as in "LIKE K*") of a name field. Apparently will need to have a button to restore the "original" descending sort on that field when the user is done with the K's since the application of that filter wipes out the form sort. The background name field of the table is indexed, but that doesn't survive the filter kill on the form. Can someone point me to an example?? I can't find them. Thank you. DanWK
Last edited by DanWK on Wed Dec 21, 2016 5:33 am, edited 3 times in total.
OpenOffice 4.1.2 MS Windows 8.1
Re: form filter applied through 26 buttons listing alpabet
http://www.mediafire.com/file/x5vbgp5v4 ... rsons3.odb (FilterForm2)
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: form filter applied through 26 buttons listing alpabet
This may solve the issue and it's going to take some time to understand it. It may be necessary to jump through all these hoops, but it seems unnecessarily complicated at first glance. I guess I'm lazy but I've learned that lazy leads to elegance eventually. Thank you for the response and I'll mark it solved for now.
OpenOffice 4.1.2 MS Windows 8.1
Re: form filter applied through 26 alphabet buttons
I've studied and understand what is being done in the sample attached above, but it's not quite what I want to do and I still can't bridge my knowledge gap. I've attached a temp.odb (with embedded HSQLDB) to show how close I am. Ignorance is killing me and I can't seem to understand Basic syntax guidance. Please look at macro "A" after studying the form, which has main and sub-form linked on "HouseHoldID". Changing the filter property of the main form gets exactly what I want. The existing code errors out on (Basic syntax error. Parentheses do not match) . I know that VB is "old fashioned" but it was something I sort of understood. I've removed the {Solved} indicator hoping for a post.
Can I get there from here? Thank you in advance.
DanWK
Code: Select all
private Sub A()
'sets filter property of main form
me.cmdfilter = ("Contacts"."HouseholdName" LIKE 'A*' )
End Sub
DanWK
- Attachments
-
- Temp.odb
- Form sample
- (14.19 KiB) Downloaded 204 times
OpenOffice 4.1.2 MS Windows 8.1
Re: form filter applied through 26 alphabet buttons
The example form consists of a form and a subform. This is trivial. Get the basics instead of Basic.
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: Form filter applied through 26 alphabet buttons
I tried to be polite and follow the rules, asking questions that seem not be answered elewhere etc and I end up getting attitude! Not appreciated! I see this often in other posts too.
The sample form offered does NOT do what I want and the responder apparently doesn't see that. Here's what's different: yes there is a main form and a subform and that is where the similarity stops. The main form in the sample offered is the alphabet letters and the subform contains what I have in my main form. To use this sample, I would have to create a sub-subform and I'm seeing that seems to be beyond the capability of OOo Base. Thank you for the samples. I'll get help elsewhere.
DanWK
The sample form offered does NOT do what I want and the responder apparently doesn't see that. Here's what's different: yes there is a main form and a subform and that is where the similarity stops. The main form in the sample offered is the alphabet letters and the subform contains what I have in my main form. To use this sample, I would have to create a sub-subform and I'm seeing that seems to be beyond the capability of OOo Base. Thank you for the samples. I'll get help elsewhere.
DanWK
OpenOffice 4.1.2 MS Windows 8.1
Re: [Solved] Form filter applied through 26 alphabet buttons
Base is not a database development suite. It is a very simple and tiny addition to this office suite. Nevertheless you can have multiple main forms on the same form document and any required level of form hieraries as soon as you leave behind the stupid form wizard. Form design begins where the wizard ends.
[Tutorial] Forms in OpenOffice.org Base
[Tutorial] Forms in OpenOffice.org Base
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