Select fields to show in query with a form

NWTools

New member
Local time
Today, 07:01
Joined
Dec 20, 2012
Messages
6
I have a table the results of a dozen different types of lab tests. I want to give management a form with a checkbox for each test (column) and let them select which tests (columns) will appear in the query. Most of the time they will only want to look at a few columns rather than all twelve. I will use parameters for beginning and end dates. I know how to do the parameters, but I do not know how to select fields to show on a query from a form.Thanks
 
Here is a sample db that lets you determine which field (only one) you want to have in your query. You should be able to adapt this to a list box of check boxes to do what you are looking to do. This is just a means for you to see a methodology. Additionally, here is a link to a search form creation.

http://www.datapigtechnologies.com/flashfiles/searchform.html
 

Attachments

Thanks Alan,
I can certainly make use of the info.
 
See the database called roll testing. On the management queries form, the combo boxes and date range boxes will always be filled, but probably only 3 or 4 of the fields will be selected to display. If you look at qry1, I always want to display LinerID, LinerRollNumber, and the parameter fields, but only the selection of the remaining fields which have been checked on the form. How do I create the sql on the fly or modify qry1 at runtime?
One other thought. Not all fields contain test results. If test is selected that has no data, will that mess up the query? Thanks for your help.
 

Attachments

Users who are viewing this thread

Back
Top Bottom