Multiple sort query

S

Shanin

I am working on a database that is basically a paper event form that gets
filled out by staff that they want to enter so they can track different
events that occur. For ease of them to use it, it is basically a table with
a bunch of yes/no boxes in front of different issues, such as med error,
accident, etc. They are wanting to be able to sort this report by either a
Team Leader, Supervisor, by staff, by individual it occurred too, by type of
event, or a combo of these. Is there a simple way to make a form that the
query can pull from that you can choose say sort by this team leader and this
location, etc (basically being able to choose all your sorting from that one
form), and run a query off of it, or is it going to take multiple queries?
Thanks
 
K

KARL DEWEY

Do you mean to select/enter Team Leader, Supervisor, staff, individual, or
location and it sort by more than one and in the order entered?

I did something similiar. Below each of your select/enter items have a
checkbox to enter sort order like --
Team Leader Supervisor Location
x
In the query add a field S1: [Forms]![YourForm]![Team LeaderSort] put
criteria -1.

Then build reports for each sort. Add the sort reports as subreports in a
main report.
 
S

Shanin

Well what I'm thinking of is having a form that will have combo boxes which
will list all the supervisors, locations, employees, type of issue, etc. and
being able to select either one of those items to pull a query limiting the
results to say just that supervisor or to choose say all four and be able to
pull a query and limit it to the combination of all four.

KARL DEWEY said:
Do you mean to select/enter Team Leader, Supervisor, staff, individual, or
location and it sort by more than one and in the order entered?

I did something similiar. Below each of your select/enter items have a
checkbox to enter sort order like --
Team Leader Supervisor Location
x
In the query add a field S1: [Forms]![YourForm]![Team LeaderSort] put
criteria -1.

Then build reports for each sort. Add the sort reports as subreports in a
main report.


Shanin said:
I am working on a database that is basically a paper event form that gets
filled out by staff that they want to enter so they can track different
events that occur. For ease of them to use it, it is basically a table with
a bunch of yes/no boxes in front of different issues, such as med error,
accident, etc. They are wanting to be able to sort this report by either a
Team Leader, Supervisor, by staff, by individual it occurred too, by type of
event, or a combo of these. Is there a simple way to make a form that the
query can pull from that you can choose say sort by this team leader and this
location, etc (basically being able to choose all your sorting from that one
form), and run a query off of it, or is it going to take multiple queries?
Thanks
 
K

KARL DEWEY

I still do not understand what you are wanting. You can have a form where
you select different reports by selecting an item from one of many fields and
in turn run a report based on what was selected. Each report will have a
different query as different information is needed. A supervisor report may
list all employees they manage, a location report list all employees at that
location, and type of issue would have other information related to the issue.

Shanin said:
Well what I'm thinking of is having a form that will have combo boxes which
will list all the supervisors, locations, employees, type of issue, etc. and
being able to select either one of those items to pull a query limiting the
results to say just that supervisor or to choose say all four and be able to
pull a query and limit it to the combination of all four.

KARL DEWEY said:
Do you mean to select/enter Team Leader, Supervisor, staff, individual, or
location and it sort by more than one and in the order entered?

I did something similiar. Below each of your select/enter items have a
checkbox to enter sort order like --
Team Leader Supervisor Location
x
In the query add a field S1: [Forms]![YourForm]![Team LeaderSort] put
criteria -1.

Then build reports for each sort. Add the sort reports as subreports in a
main report.


Shanin said:
I am working on a database that is basically a paper event form that gets
filled out by staff that they want to enter so they can track different
events that occur. For ease of them to use it, it is basically a table with
a bunch of yes/no boxes in front of different issues, such as med error,
accident, etc. They are wanting to be able to sort this report by either a
Team Leader, Supervisor, by staff, by individual it occurred too, by type of
event, or a combo of these. Is there a simple way to make a form that the
query can pull from that you can choose say sort by this team leader and this
location, etc (basically being able to choose all your sorting from that one
form), and run a query off of it, or is it going to take multiple queries?
Thanks
 
S

Shanin

I was wanting to know if it could be done in one query, which I doubted, or
if it would have to be done in multiple queries. The person I am making it
for would like a "all inclusive query that she can select as many options as
possible to narrow her results if she wants, using as many or as few of those
criteria as she likes. So say if she left supervisor blank and just wanted
to sort by location, she would just select a person from the location drop
down. Or if she wanted to see a report showing all at a location for a
particular employee, she could just select the location fromt the drop down,
then an employee from the drop down, and select run query. I know how to
make a query that will sort by what is selected on a form, such as a date
range and one other, but I didn't know if it would be possible to have it
look at multiple choices and if they were blank, just ignore them and go to
the next.

KARL DEWEY said:
I still do not understand what you are wanting. You can have a form where
you select different reports by selecting an item from one of many fields and
in turn run a report based on what was selected. Each report will have a
different query as different information is needed. A supervisor report may
list all employees they manage, a location report list all employees at that
location, and type of issue would have other information related to the issue.

Shanin said:
Well what I'm thinking of is having a form that will have combo boxes which
will list all the supervisors, locations, employees, type of issue, etc. and
being able to select either one of those items to pull a query limiting the
results to say just that supervisor or to choose say all four and be able to
pull a query and limit it to the combination of all four.

KARL DEWEY said:
Do you mean to select/enter Team Leader, Supervisor, staff, individual, or
location and it sort by more than one and in the order entered?

I did something similiar. Below each of your select/enter items have a
checkbox to enter sort order like --
Team Leader Supervisor Location
x
In the query add a field S1: [Forms]![YourForm]![Team LeaderSort] put
criteria -1.

Then build reports for each sort. Add the sort reports as subreports in a
main report.


:

I am working on a database that is basically a paper event form that gets
filled out by staff that they want to enter so they can track different
events that occur. For ease of them to use it, it is basically a table with
a bunch of yes/no boxes in front of different issues, such as med error,
accident, etc. They are wanting to be able to sort this report by either a
Team Leader, Supervisor, by staff, by individual it occurred too, by type of
event, or a combo of these. Is there a simple way to make a form that the
query can pull from that you can choose say sort by this team leader and this
location, etc (basically being able to choose all your sorting from that one
form), and run a query off of it, or is it going to take multiple queries?
Thanks
 
K

KARL DEWEY

I think you will need VBA coding. Maybe post to Forms Coding.

Shanin said:
I was wanting to know if it could be done in one query, which I doubted, or
if it would have to be done in multiple queries. The person I am making it
for would like a "all inclusive query that she can select as many options as
possible to narrow her results if she wants, using as many or as few of those
criteria as she likes. So say if she left supervisor blank and just wanted
to sort by location, she would just select a person from the location drop
down. Or if she wanted to see a report showing all at a location for a
particular employee, she could just select the location fromt the drop down,
then an employee from the drop down, and select run query. I know how to
make a query that will sort by what is selected on a form, such as a date
range and one other, but I didn't know if it would be possible to have it
look at multiple choices and if they were blank, just ignore them and go to
the next.

KARL DEWEY said:
I still do not understand what you are wanting. You can have a form where
you select different reports by selecting an item from one of many fields and
in turn run a report based on what was selected. Each report will have a
different query as different information is needed. A supervisor report may
list all employees they manage, a location report list all employees at that
location, and type of issue would have other information related to the issue.

Shanin said:
Well what I'm thinking of is having a form that will have combo boxes which
will list all the supervisors, locations, employees, type of issue, etc. and
being able to select either one of those items to pull a query limiting the
results to say just that supervisor or to choose say all four and be able to
pull a query and limit it to the combination of all four.

:

Do you mean to select/enter Team Leader, Supervisor, staff, individual, or
location and it sort by more than one and in the order entered?

I did something similiar. Below each of your select/enter items have a
checkbox to enter sort order like --
Team Leader Supervisor Location
x
In the query add a field S1: [Forms]![YourForm]![Team LeaderSort] put
criteria -1.

Then build reports for each sort. Add the sort reports as subreports in a
main report.


:

I am working on a database that is basically a paper event form that gets
filled out by staff that they want to enter so they can track different
events that occur. For ease of them to use it, it is basically a table with
a bunch of yes/no boxes in front of different issues, such as med error,
accident, etc. They are wanting to be able to sort this report by either a
Team Leader, Supervisor, by staff, by individual it occurred too, by type of
event, or a combo of these. Is there a simple way to make a form that the
query can pull from that you can choose say sort by this team leader and this
location, etc (basically being able to choose all your sorting from that one
form), and run a query off of it, or is it going to take multiple queries?
Thanks
 

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

Top