ad hoc data query from form with check boxes

thatlem

Registered User.
Local time
Today, 17:44
Joined
Jan 29, 2009
Messages
115
Am wondering if anyone knows of a way to create an ad hoc data query from a form, which also shows check boxes for all fields. Basically, I would like to have the user be able to check the data box for the fields they want to see, then run the query. The query would only display those fields checked.

I am assuming I could build a "super" query with all fields, and then use code in the form to select the fields as visible or not visible based on the check box result, but am not sure how to go about building the code.

Any suggestions? Thanks :p
 
You have also posted this in the Excel forum, please delete that thread.

Why :p

It is possible to o this for a report but Idon't think it is for a query

Brian
 
You use a continuous form for this and include the checkbox.

Your checkbox must be linked to the record source of your form.

Your form will have a button that will call a function to process all checked.
 
That's what I was afraid of. Can you educate me on the code I would need to run this in a report.

Thanks
 
Although I said that you can do it, I wouldn't.
The way it works is that you make the controls visible or invisible, so they are always there and thus taking up space, thus the report looks messy, and the system does more work than it needs, it is far better to customise the queries and reports.

A Reports control form with explanatory command buttons to run the reports is the easiest and best way for your users.

Brian
 

Users who are viewing this thread

Back
Top Bottom