Topic: Filter records

Hi All,
I have an EQUIPMENT table.  One of the fields defines if it is a Spare part (Spare/No).  I would like to be able to generate 2 reports, one for Spare parts and one for everything else.
.
It doesn't seem to me like it should be too hard.  Just filter the table for Field = SPARE or Field = No.
.
But I've been trying for a couple of days now and can't seem to figure it out.  Maybe I'm having a senior moment LOL.
.
Thoughts will be appreciated as always.
Thanks, Frank

Re: Filter records

Hi Frank,
Not sure what your problem is as you don't say nor whether you want to chain the reports together so that the 'spares' report runs and then the 'non spares' runs after.
Anyway, I took a guess that the 'spare/no' field is a combobox with a lookup (rather than a yes/no boolean) and that you'd want the option to print just 'spares', just 'not spares' or everything.  But the principle is the same whichever way you filter.
The attached is one way of doing it.
Derek.

Post's attachments

Attachment icon servicerecord 3.zip 344.49 kb, 197 downloads since 2021-09-21 

3 (edited by papafrankc 2021-09-21 20:30:12)

Re: Filter records

Derek,
Many thanks for your response.
.
Last night, before your recent post, I found a solution on the forum that was posted by yourself last October:
Example of condition color - 2020-10-17 17:22:50 (edited by derek 2020-10-17 17:45:48).
.
It appears to do what I would like, using buttons instead of a combobox.
.
I'm not sure which one I will use, but I'm a leaning towards the buttons.  They take up more space on a form but I think they might be a little more user friendly.  But your recent solution is maybe a little simpler?  Decisions, decisions....oh what to do smile
.
This thing about reporting on different fields in a table has been bugging me for a while now so having 2 usable solutions is great.
------------------------------------------------------------
COMMENT: I'm starting to go through your solution of "2020-10-17" and it looks like it has some really nice features that I hadn't thought of yet.  IN-STOCK, LOW STOCK, RE-ORDER and OUT OF STOCK.  This should give me the ability to manage the SPARE parts really well.  VERY VERY NICE smile
.
Thanks for guiding us novices
Frank

4 (edited by derek 2021-09-22 17:50:33)

Re: Filter records

Frank,
If you prefer discrete buttons to call your reports (rather than using parameters at run-time) but are concerned about the amount of space each button might take up, then perhaps you could look at putting them all on a pop-up panel (see servicerecords3a in the attachment) or (and it's a bit more fiddly) putting them into a combobox (see servicerecords3b in the attachment).
The only thing I would probably advise is, whichever method you choose, to apply it consistently across your whole project if possible.
Derek.

Post's attachments

Attachment icon service record.zip 701.12 kb, 177 downloads since 2021-09-22