Printing only selected records from a search query?

M Costumes

Member
Local time
Today, 14:30
Joined
Feb 9, 2021
Messages
75
I made an inventory/rental database and I'm now in the process of fully working in it and of course I'm finding bells & whistles I would like to add. It has a search function that works well--user enters in parameters via combo boxes and it returns all inventory items meeting those criteria. Right now, it opens all the results/records in a single report. I'd like to add an additional option (it would be a second button) where the user could choose to open the results in a form to view the records, and then select with a checkbox which records to print in a report. Is that possible?

I can use the same query to open the results in a form (just need to build the form and button), but from there, to select specific records and then only those records show in the report, I'm guessing I need to write another query based on that form? Thank you for your input!
 
Hi. If you plan to use a checkbox, that checkbox has to be in the table. You can then use a query for your report where you filter the data by that checkbox. However, you must also consider providing a way to reset the checkbox, so the user can make the next selections without being affected by any previous selections. This could also turn out to be one where you would use a local temporary table, if multiple users could be doing the search, making selections, and printing reports at the same time.
 
an alternative can be found here - it doesn't use a checkbox, but uses conditional formatting to indicate selected rows


conditional formatting is based on the contents of the hidden control -

So you can pass a filter in your openreport parameters along the lines of

"ID IN (" & replace(hiddentextfield,"|",",") & "")"
 
to 'clear all/select all'? sound like a good idea. To deselect, you just click on the row again
 

Users who are viewing this thread

Back
Top Bottom