nman84
nman84

Reputation: 435

allowing user to customize what fields he or she wants for the report in access

I have a report whose record source is query from 6 tables. In the report I have 6 check boxes, one for each table. I would like have the user the ability to click on these checkboxes and the table in subform of the report should display only the fields which belong to those tables (checked ones not the unchecked).

There is a way to do this in query design view by clicking check box for Show and make those fields not appear, but i don't know how to access that property using macro or procedure.

Also note that the Report form has subform which displays the table (query datasheet). Right now this table has like 45 fields, thats why i need the above functionality.

Here is the screenshot of the query (design view), I need to control show property in each column (using VBscript or macro). So I want the user have the ability to choose which columns to appear in the table (subform) of the report.

search query screenshot

Upvotes: 1

Views: 180

Answers (1)

Matt Donnan
Matt Donnan

Reputation: 4993

I had this issue once (with 2003) and found that you can't use the quer designer whilst using runtime mode which is a shame, you could allow your users to run outside of runtime and preset a query as "Snap-shot" so they can only execute a read-only query. Alternatively you could go the the trouble I did of setting up a custom form with combo boxes to allow table/field selection and then store your table joins in another table, although this will only work if each table is only joined to one other otherwise it will fall apart.

Upvotes: 1

Related Questions