User Selected Query

  • Thread starter Thread starter Rock
  • Start date Start date
R

Rock

I have a rather simple table, about 15 fields. Is there a way to
build a form and or query that would have the user select the various
fields they would want in the query result? The way the show check
box works in the design grid, but more in a form type look? Any
suggestions would be great!
 
Open the form in form view.

Go up to Records, Filter, Filter by Form.

Click into a field and type what you are looking for.

If you need more than one field, click on the Or tab at the lower left of
the form and enter something in another field.

Go up to Records, Apply Filter/Sort. When done, Remove Filter/Sort.

There should be some buttons to do filtering faster up near the word Help.
They look like funnels, not filters, to me.
 
Open the form in form view.

Go up to Records, Filter, Filter by Form.

Click into a field and type what you are looking for.

If you need more than one field, click on the Or tab at the lower left of
the form and enter something in another field.

Go up to Records, Apply Filter/Sort. When done, Remove Filter/Sort.

There should be some buttons to do filtering faster up near the word Help.
They look like funnels, not filters, to me.

--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.





- Show quoted text -

Thanks Jerry,

Currently I have a couple of queries that can be run and the results
are exported to excel so the user can further tweak the results if
they wish. These queries are more or less, predefined as to what
fields are selected. I was looking for maybe a form with checkboxes,
one for each field in the query and by clicking the checkbox of the
field(s) they want to see, then a Run Query button will run the query
with only those fields....does that make sense?
 
That can be done. Create a form called something like frmParameter. On it put
a text box named something like txtParameter. Also put a button on the form
to run the query.

In the query put something like this in the criteria using the names you
chose for the form and text box:
[Forms]![frmParameter]![txtParameter]

The form must stay open; however, it can be minimized or even hidden.

Now if you want multiple fields, it can be done; however you'll need to
figure out what to do if someone doesn't fill out a field on the form.
 
That can be done. Create a form called something like frmParameter. On it put
a text box named something like txtParameter. Also put a button on the form
to run the query.

In the query put something like this in the criteria using the names you
chose for the form and text box:
[Forms]![frmParameter]![txtParameter]

The form must stay open; however, it can be minimized or even hidden.

Now if you want multiple fields, it can be done; however you'll need to
figure out what to do if someone doesn't fill out a field on the form.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.



Thanks Jerry,
Currently I have a couple of queries that can be run and the results
are exported to excel so the user can further tweak the results if
they wish. These queries are more or less, predefined as to what
fields are selected. I was looking for maybe a form with checkboxes,
one for each field in the query and by clicking the checkbox of the
field(s) they want to see, then a Run Query button will run the query
with only those fields....does that make sense?- Hide quoted text -

- Show quoted text -

Interesting but again, not sure if this is what I'm looking for. The
table has 20 columns related to employees, emplID, Name, Supervisor,
Cost Center, Hourly or Salary, Location...

On the form I have the text box you discribed for Cost Center, for
example, then a series of checkboxes for the other fields, So in my
result set I want only Cost Center and Name so I enter in the Cost
Center of 1234567 and check the Name checkbox, the result returns 2
columns, one for Cost Center and the other Name, listing all employees
in that cost center. If I want to run it again, this time I check
Name and Supervisor, then I get 3 columns, listing the name and their
supervisor's name....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top