I’m sure it is a stupid question. I have a simple table in Base, and I have a form to enter/review data.
I have to use a simple filter very often: sort out all the records where a specific field is zero. I click on the Form Based Filters button, enter !=0 and click on Apply Form Based Filter.
Is there any way to do it with one mouseclick? A button on the form, a macro, anything?
Thank you.
(If it’s relevant: Win 10, LibreOffice Version 7.4.3.2)
Open the form for editing.
Turn off design view and apply the filter.
Now you can toggle that filter on and off.
Save the form. It will be saved with the toggle filter.
Thank you!
It would be a perfect solution, but there seems to be some problem.
The filter works perfectly!
But after saving the form, all the buttons on it lose their text. Even if I create a new one, the label is not visible.
It looks like the buttons got a graphic overlay. I can remove it (by choosing a background image for the button then canceling it), but the size of the .odb file increases from 300kb to 1200kb…
I have no idea if it’s a known bug, or something with my system…
I’m afraid, something broke when editing the form, and this has nothing to do with the stored filter. Can you build a new form and delete the broken one?
Or if the database is an embedded one, can you upload the database (remove any confidential contents), so we can have a look at it?
Oh dear god. After half a day of debugging and experimenting with creating new forms and editing the old one, it finally works.
I don’t exactly understand what caused the problem, and to be honest, at this point I don’t even care anymore.
It works.
This goddamn problem is related to my linked images (only the path to the files are stored in the database) AND the form-based filter together.
If I remove the two images from the form, I can do whatever I want with the filter, everything works fine.
If I have the linked images on the form, then saving the database with the form-based filter, the size of the .odb file increases from 360kB to something between 800kB and 5MB. Even if I add the image control AFTER the filters.
I mean, I remove the image controls from the form, save the db, close everything, (filesize: 360 kB), start again, edit form, add the filters, save, close (filesize: 360 kB), start again, edit, add image controls, save, close, and filesize: 4,2 MB. But until I enter the Data Field in the Data tab of Control Properties, it’s ok. Entering the Data Field increases the filesize - but only, if the form-based filter is set.
The worst thing is that I have no idea why does it work now. I have repeated the same steps again and again, skipping just one step here or there, exiting and saving after every step, and now it works without any extreme increase in the filesize.
Sometimes I feel like I just don’t want to understand things anymore…
Sorry for wasting your time, and thank you very much again for the simple solution.
It’s not your fault. Base is underdeveloped. You must not store any pictures in databases. Instead of the pictures, you can store file names or picture files stored in the same directory as the database document. Then bind a form’s picture control to the text column storing the file names.
That is exactly what I am doing (“only the path to the files are stored in the database”). And as soon as I enter the field’s name (which holds the path and filename) into the image control, the size of the database file increases a lot.