use option group to filter a report

G

Guest

I have a report called Alphabetical Contact Listing with a source table named
Contacts. I would like to create a form that has an option group to filter
that report. The options I would like are:

-Show All
-Show SNCO & Above
-Show Officers
-Show E5 & below
-Custom Rank (Which when selected enables a list box of all available ranks
in the table and I would like the user to be able to select more than one
rank using Ctrl-Click)
-Check-In Date (Which again enables a list box showing available months and
years from a date field which is formatted 6/1/2007 with ability to select
more than one selection)

Once the user presses the Preview Report button, I would like another form
to open up with a Combo box of available fields in the report to sort the
report by (i.e. LastName, CheckInDate, Rank). I looked at the example Sales
Reports Dialog in the Northwinds Database, but it uses an option group based
on several reports already created. I have only one report and want the
option group to filter that report. I don't have any queries created yet
because I've seen examples in the various newsgroups that show queries
written in the code, but I'm still new at this and don't know how to go about
doing that. I know this is asking a lot.
 
G

Guest

I wish you could edit your posts in this newsgroup. On second thought, I
would like to add the sort criteria to the first form rather than having it
 
G

Guest

Part 1 ---
In the query for the report have two sets of criteria - Option Group number
and Grade criteria.
Example --
0 Like "*"
1 >"E5"
2 >"O0"
3 <"E6"
5 [Forms]![YourFormName]![YourListBox]
You will need the code for multi-select.

Part 2 - Check-In Date
Here again you need the code for multi-select.

Part 3 - Sorting
Access reports ignores sorts in done in queries for the most part so you
might need to use different reports so as to use the report Grouping and
Sorting. Search for more on this.
 
G

Guest

Thank you for your help. I must admit, though, I'm a little lost. The
report is based on a query now (qryAlphaRoster), but I have no idea how to
write the criteria statement as you have listed. To compound the problem,
the rank field doesn't have paygrades, it has ranks (i.e. SSGT, MAJ, LCPL,
HM3(for Navy)), so I'm assuming that in the criteria statement I will have to
manually type in every possible rank combination that could apply to say E5 &
below. Unless I create a new table with all the rank combinations I can
expect and set the relationships up (would that even work?).

KARL DEWEY said:
Part 1 ---
In the query for the report have two sets of criteria - Option Group number
and Grade criteria.
Example --
0 Like "*"
1 >"E5"
2 >"O0"
3 <"E6"
5 [Forms]![YourFormName]![YourListBox]
You will need the code for multi-select.

Part 2 - Check-In Date
Here again you need the code for multi-select.

Part 3 - Sorting
Access reports ignores sorts in done in queries for the most part so you
might need to use different reports so as to use the report Grouping and
Sorting. Search for more on this.
--
KARL DEWEY
Build a little - Test a little


Gntlhnds said:
I have a report called Alphabetical Contact Listing with a source table named
Contacts. I would like to create a form that has an option group to filter
that report. The options I would like are:

-Show All
-Show SNCO & Above
-Show Officers
-Show E5 & below
-Custom Rank (Which when selected enables a list box of all available ranks
in the table and I would like the user to be able to select more than one
rank using Ctrl-Click)
-Check-In Date (Which again enables a list box showing available months and
years from a date field which is formatted 6/1/2007 with ability to select
more than one selection)

Once the user presses the Preview Report button, I would like another form
to open up with a Combo box of available fields in the report to sort the
report by (i.e. LastName, CheckInDate, Rank). I looked at the example Sales
Reports Dialog in the Northwinds Database, but it uses an option group based
on several reports already created. I have only one report and want the
option group to filter that report. I don't have any queries created yet
because I've seen examples in the various newsgroups that show queries
written in the code, but I'm still new at this and don't know how to go about
doing that. I know this is asking a lot.
 
G

Guest

Unless I create a new table with all the rank combinations I can expect and
set the relationships up (would that even work?).
Yes, build a translation table like below and join but there are problems --
Rank PayGrade
SFC E7
MAJ O4
LCPL E3
HM3 E3
SSGT E6 Army, E5 Air Force
MSG E8 Army
MSGT E7 Air Force
You might think about adding a pay grade field if you do not have one already.
In the design view grid add fields and insert criteria in the rows as below
for your fields --
PayGrade Expr1:
[Forms]![YourFormName]![YourOptionGroup]
Like "*" 0
"E5" 1
"O0" 2
<"E6" 3
[Forms]![YourFormName]![YourListBox] 4


--
KARL DEWEY
Build a little - Test a little

Gntlhnds said:
Thank you for your help. I must admit, though, I'm a little lost. The
report is based on a query now (qryAlphaRoster), but I have no idea how to
write the criteria statement as you have listed. To compound the problem,
the rank field doesn't have paygrades, it has ranks (i.e. SSGT, MAJ, LCPL,
HM3(for Navy)), so I'm assuming that in the criteria statement I will have to
manually type in every possible rank combination that could apply to say E5 &
below. Unless I create a new table with all the rank combinations I can
expect and set the relationships up (would that even work?).

KARL DEWEY said:
Part 1 ---
In the query for the report have two sets of criteria - Option Group number
and Grade criteria.
Example --
0 Like "*"
1 >"E5"
2 >"O0"
3 <"E6"
5 [Forms]![YourFormName]![YourListBox]
You will need the code for multi-select.

Part 2 - Check-In Date
Here again you need the code for multi-select.

Part 3 - Sorting
Access reports ignores sorts in done in queries for the most part so you
might need to use different reports so as to use the report Grouping and
Sorting. Search for more on this.
--
KARL DEWEY
Build a little - Test a little


Gntlhnds said:
I have a report called Alphabetical Contact Listing with a source table named
Contacts. I would like to create a form that has an option group to filter
that report. The options I would like are:

-Show All
-Show SNCO & Above
-Show Officers
-Show E5 & below
-Custom Rank (Which when selected enables a list box of all available ranks
in the table and I would like the user to be able to select more than one
rank using Ctrl-Click)
-Check-In Date (Which again enables a list box showing available months and
years from a date field which is formatted 6/1/2007 with ability to select
more than one selection)

Once the user presses the Preview Report button, I would like another form
to open up with a Combo box of available fields in the report to sort the
report by (i.e. LastName, CheckInDate, Rank). I looked at the example Sales
Reports Dialog in the Northwinds Database, but it uses an option group based
on several reports already created. I have only one report and want the
option group to filter that report. I don't have any queries created yet
because I've seen examples in the various newsgroups that show queries
written in the code, but I'm still new at this and don't know how to go about
doing that. I know this is asking a lot.
 
G

Guest

Due to the word wrap, I have no clue about that table you wrote and what
needs to go where. I finally fixed the issue with selecting the proper
paygrades, so now I just need to write the criteria in the query. Do I need
just one "Paygrade" field in the query and multiple criteria, or do I need a
seperate "Paygrade" field for each option group? If not, how would the WHERE
statement look for that then? Also, where would I put the multi-select code?

KARL DEWEY said:
set the relationships up (would that even work?).
Yes, build a translation table like below and join but there are problems --
Rank PayGrade
SFC E7
MAJ O4
LCPL E3
HM3 E3
SSGT E6 Army, E5 Air Force
MSG E8 Army
MSGT E7 Air Force
You might think about adding a pay grade field if you do not have one already.
In the design view grid add fields and insert criteria in the rows as below
for your fields --
PayGrade Expr1:
[Forms]![YourFormName]![YourOptionGroup]
Like "*" 0
"E5" 1
"O0" 2
<"E6" 3
[Forms]![YourFormName]![YourListBox] 4


--
KARL DEWEY
Build a little - Test a little

Gntlhnds said:
Thank you for your help. I must admit, though, I'm a little lost. The
report is based on a query now (qryAlphaRoster), but I have no idea how to
write the criteria statement as you have listed. To compound the problem,
the rank field doesn't have paygrades, it has ranks (i.e. SSGT, MAJ, LCPL,
HM3(for Navy)), so I'm assuming that in the criteria statement I will have to
manually type in every possible rank combination that could apply to say E5 &
below. Unless I create a new table with all the rank combinations I can
expect and set the relationships up (would that even work?).

KARL DEWEY said:
Part 1 ---
In the query for the report have two sets of criteria - Option Group number
and Grade criteria.
Example --
0 Like "*"
1 >"E5"
2 >"O0"
3 <"E6"
5 [Forms]![YourFormName]![YourListBox]
You will need the code for multi-select.

Part 2 - Check-In Date
Here again you need the code for multi-select.

Part 3 - Sorting
Access reports ignores sorts in done in queries for the most part so you
might need to use different reports so as to use the report Grouping and
Sorting. Search for more on this.
--
KARL DEWEY
Build a little - Test a little


:

I have a report called Alphabetical Contact Listing with a source table named
Contacts. I would like to create a form that has an option group to filter
that report. The options I would like are:

-Show All
-Show SNCO & Above
-Show Officers
-Show E5 & below
-Custom Rank (Which when selected enables a list box of all available ranks
in the table and I would like the user to be able to select more than one
rank using Ctrl-Click)
-Check-In Date (Which again enables a list box showing available months and
years from a date field which is formatted 6/1/2007 with ability to select
more than one selection)

Once the user presses the Preview Report button, I would like another form
to open up with a Combo box of available fields in the report to sort the
report by (i.e. LastName, CheckInDate, Rank). I looked at the example Sales
Reports Dialog in the Northwinds Database, but it uses an option group based
on several reports already created. I have only one report and want the
option group to filter that report. I don't have any queries created yet
because I've seen examples in the various newsgroups that show queries
written in the code, but I'm still new at this and don't know how to go about
doing that. I know this is asking a lot.
 
G

Guest

I figured it out. The only things I haven't gotten working is the "Custom
Rank" list box selection and the Check-In Date Selection.

Gntlhnds said:
Due to the word wrap, I have no clue about that table you wrote and what
needs to go where. I finally fixed the issue with selecting the proper
paygrades, so now I just need to write the criteria in the query. Do I need
just one "Paygrade" field in the query and multiple criteria, or do I need a
seperate "Paygrade" field for each option group? If not, how would the WHERE
statement look for that then? Also, where would I put the multi-select code?

KARL DEWEY said:
Unless I create a new table with all the rank combinations I can expect and
set the relationships up (would that even work?).
Yes, build a translation table like below and join but there are problems --
Rank PayGrade
SFC E7
MAJ O4
LCPL E3
HM3 E3
SSGT E6 Army, E5 Air Force
MSG E8 Army
MSGT E7 Air Force
You might think about adding a pay grade field if you do not have one already.
The report is based on a query now (qryAlphaRoster), but I have no idea how to write the criteria statement as you have listed.
In the design view grid add fields and insert criteria in the rows as below
for your fields --
PayGrade Expr1:
[Forms]![YourFormName]![YourOptionGroup]
Like "*" 0
"E5" 1
"O0" 2
<"E6" 3
[Forms]![YourFormName]![YourListBox] 4


--
KARL DEWEY
Build a little - Test a little

Gntlhnds said:
Thank you for your help. I must admit, though, I'm a little lost. The
report is based on a query now (qryAlphaRoster), but I have no idea how to
write the criteria statement as you have listed. To compound the problem,
the rank field doesn't have paygrades, it has ranks (i.e. SSGT, MAJ, LCPL,
HM3(for Navy)), so I'm assuming that in the criteria statement I will have to
manually type in every possible rank combination that could apply to say E5 &
below. Unless I create a new table with all the rank combinations I can
expect and set the relationships up (would that even work?).

:

Part 1 ---
In the query for the report have two sets of criteria - Option Group number
and Grade criteria.
Example --
0 Like "*"
1 >"E5"
2 >"O0"
3 <"E6"
5 [Forms]![YourFormName]![YourListBox]
You will need the code for multi-select.

Part 2 - Check-In Date
Here again you need the code for multi-select.

Part 3 - Sorting
Access reports ignores sorts in done in queries for the most part so you
might need to use different reports so as to use the report Grouping and
Sorting. Search for more on this.
--
KARL DEWEY
Build a little - Test a little


:

I have a report called Alphabetical Contact Listing with a source table named
Contacts. I would like to create a form that has an option group to filter
that report. The options I would like are:

-Show All
-Show SNCO & Above
-Show Officers
-Show E5 & below
-Custom Rank (Which when selected enables a list box of all available ranks
in the table and I would like the user to be able to select more than one
rank using Ctrl-Click)
-Check-In Date (Which again enables a list box showing available months and
years from a date field which is formatted 6/1/2007 with ability to select
more than one selection)

Once the user presses the Preview Report button, I would like another form
to open up with a Combo box of available fields in the report to sort the
report by (i.e. LastName, CheckInDate, Rank). I looked at the example Sales
Reports Dialog in the Northwinds Database, but it uses an option group based
on several reports already created. I have only one report and want the
option group to filter that report. I don't have any queries created yet
because I've seen examples in the various newsgroups that show queries
written in the code, but I'm still new at this and don't know how to go about
doing that. I know this is asking a lot.
 
G

Guest

With the exception of the Custom Rank list box option and Check-In date list
box option, I figured it out. Since the Custom Rank list box shows ranks
instead of paygrade, I put [Forms]![frmAlphaRosterDialog]![List15] in the
criteria statement under the Rank field on the same line as option 5, but it
doesn't work, even if I only select one rank. I put
[Forms]![frmAlphaRosterDialog]![List17] in the criteria statement of the
Check-In date field on the same line as option 6, but that doesn't do
anything either (that may be because the field is formatted mm/dd/yy, where
as the list box is mmm/yy).

Gntlhnds said:
Due to the word wrap, I have no clue about that table you wrote and what
needs to go where. I finally fixed the issue with selecting the proper
paygrades, so now I just need to write the criteria in the query. Do I need
just one "Paygrade" field in the query and multiple criteria, or do I need a
seperate "Paygrade" field for each option group? If not, how would the WHERE
statement look for that then? Also, where would I put the multi-select code?

KARL DEWEY said:
Unless I create a new table with all the rank combinations I can expect and
set the relationships up (would that even work?).
Yes, build a translation table like below and join but there are problems --
Rank PayGrade
SFC E7
MAJ O4
LCPL E3
HM3 E3
SSGT E6 Army, E5 Air Force
MSG E8 Army
MSGT E7 Air Force
You might think about adding a pay grade field if you do not have one already.
The report is based on a query now (qryAlphaRoster), but I have no idea how to write the criteria statement as you have listed.
In the design view grid add fields and insert criteria in the rows as below
for your fields --
PayGrade Expr1:
[Forms]![YourFormName]![YourOptionGroup]
Like "*" 0
"E5" 1
"O0" 2
<"E6" 3
[Forms]![YourFormName]![YourListBox] 4


--
KARL DEWEY
Build a little - Test a little

Gntlhnds said:
Thank you for your help. I must admit, though, I'm a little lost. The
report is based on a query now (qryAlphaRoster), but I have no idea how to
write the criteria statement as you have listed. To compound the problem,
the rank field doesn't have paygrades, it has ranks (i.e. SSGT, MAJ, LCPL,
HM3(for Navy)), so I'm assuming that in the criteria statement I will have to
manually type in every possible rank combination that could apply to say E5 &
below. Unless I create a new table with all the rank combinations I can
expect and set the relationships up (would that even work?).

:

Part 1 ---
In the query for the report have two sets of criteria - Option Group number
and Grade criteria.
Example --
0 Like "*"
1 >"E5"
2 >"O0"
3 <"E6"
5 [Forms]![YourFormName]![YourListBox]
You will need the code for multi-select.

Part 2 - Check-In Date
Here again you need the code for multi-select.

Part 3 - Sorting
Access reports ignores sorts in done in queries for the most part so you
might need to use different reports so as to use the report Grouping and
Sorting. Search for more on this.
--
KARL DEWEY
Build a little - Test a little


:

I have a report called Alphabetical Contact Listing with a source table named
Contacts. I would like to create a form that has an option group to filter
that report. The options I would like are:

-Show All
-Show SNCO & Above
-Show Officers
-Show E5 & below
-Custom Rank (Which when selected enables a list box of all available ranks
in the table and I would like the user to be able to select more than one
rank using Ctrl-Click)
-Check-In Date (Which again enables a list box showing available months and
years from a date field which is formatted 6/1/2007 with ability to select
more than one selection)

Once the user presses the Preview Report button, I would like another form
to open up with a Combo box of available fields in the report to sort the
report by (i.e. LastName, CheckInDate, Rank). I looked at the example Sales
Reports Dialog in the Northwinds Database, but it uses an option group based
on several reports already created. I have only one report and want the
option group to filter that report. I don't have any queries created yet
because I've seen examples in the various newsgroups that show queries
written in the code, but I'm still new at this and don't know how to go about
doing that. I know this is asking a lot.
 
G

Guest

Post your query SQL and I will edit in the criteria.
--
KARL DEWEY
Build a little - Test a little


Gntlhnds said:
Due to the word wrap, I have no clue about that table you wrote and what
needs to go where. I finally fixed the issue with selecting the proper
paygrades, so now I just need to write the criteria in the query. Do I need
just one "Paygrade" field in the query and multiple criteria, or do I need a
seperate "Paygrade" field for each option group? If not, how would the WHERE
statement look for that then? Also, where would I put the multi-select code?

KARL DEWEY said:
Unless I create a new table with all the rank combinations I can expect and
set the relationships up (would that even work?).
Yes, build a translation table like below and join but there are problems --
Rank PayGrade
SFC E7
MAJ O4
LCPL E3
HM3 E3
SSGT E6 Army, E5 Air Force
MSG E8 Army
MSGT E7 Air Force
You might think about adding a pay grade field if you do not have one already.
The report is based on a query now (qryAlphaRoster), but I have no idea how to write the criteria statement as you have listed.
In the design view grid add fields and insert criteria in the rows as below
for your fields --
PayGrade Expr1:
[Forms]![YourFormName]![YourOptionGroup]
Like "*" 0
"E5" 1
"O0" 2
<"E6" 3
[Forms]![YourFormName]![YourListBox] 4


--
KARL DEWEY
Build a little - Test a little

Gntlhnds said:
Thank you for your help. I must admit, though, I'm a little lost. The
report is based on a query now (qryAlphaRoster), but I have no idea how to
write the criteria statement as you have listed. To compound the problem,
the rank field doesn't have paygrades, it has ranks (i.e. SSGT, MAJ, LCPL,
HM3(for Navy)), so I'm assuming that in the criteria statement I will have to
manually type in every possible rank combination that could apply to say E5 &
below. Unless I create a new table with all the rank combinations I can
expect and set the relationships up (would that even work?).

:

Part 1 ---
In the query for the report have two sets of criteria - Option Group number
and Grade criteria.
Example --
0 Like "*"
1 >"E5"
2 >"O0"
3 <"E6"
5 [Forms]![YourFormName]![YourListBox]
You will need the code for multi-select.

Part 2 - Check-In Date
Here again you need the code for multi-select.

Part 3 - Sorting
Access reports ignores sorts in done in queries for the most part so you
might need to use different reports so as to use the report Grouping and
Sorting. Search for more on this.
--
KARL DEWEY
Build a little - Test a little


:

I have a report called Alphabetical Contact Listing with a source table named
Contacts. I would like to create a form that has an option group to filter
that report. The options I would like are:

-Show All
-Show SNCO & Above
-Show Officers
-Show E5 & below
-Custom Rank (Which when selected enables a list box of all available ranks
in the table and I would like the user to be able to select more than one
rank using Ctrl-Click)
-Check-In Date (Which again enables a list box showing available months and
years from a date field which is formatted 6/1/2007 with ability to select
more than one selection)

Once the user presses the Preview Report button, I would like another form
to open up with a Combo box of available fields in the report to sort the
report by (i.e. LastName, CheckInDate, Rank). I looked at the example Sales
Reports Dialog in the Northwinds Database, but it uses an option group based
on several reports already created. I have only one report and want the
option group to filter that report. I don't have any queries created yet
because I've seen examples in the various newsgroups that show queries
written in the code, but I'm still new at this and don't know how to go about
doing that. I know this is asking a lot.
 
G

Guest

Post your query SQL and I will try to edit it for you.
--
KARL DEWEY
Build a little - Test a little


Gntlhnds said:
Due to the word wrap, I have no clue about that table you wrote and what
needs to go where. I finally fixed the issue with selecting the proper
paygrades, so now I just need to write the criteria in the query. Do I need
just one "Paygrade" field in the query and multiple criteria, or do I need a
seperate "Paygrade" field for each option group? If not, how would the WHERE
statement look for that then? Also, where would I put the multi-select code?

KARL DEWEY said:
Unless I create a new table with all the rank combinations I can expect and
set the relationships up (would that even work?).
Yes, build a translation table like below and join but there are problems --
Rank PayGrade
SFC E7
MAJ O4
LCPL E3
HM3 E3
SSGT E6 Army, E5 Air Force
MSG E8 Army
MSGT E7 Air Force
You might think about adding a pay grade field if you do not have one already.
The report is based on a query now (qryAlphaRoster), but I have no idea how to write the criteria statement as you have listed.
In the design view grid add fields and insert criteria in the rows as below
for your fields --
PayGrade Expr1:
[Forms]![YourFormName]![YourOptionGroup]
Like "*" 0
"E5" 1
"O0" 2
<"E6" 3
[Forms]![YourFormName]![YourListBox] 4


--
KARL DEWEY
Build a little - Test a little

Gntlhnds said:
Thank you for your help. I must admit, though, I'm a little lost. The
report is based on a query now (qryAlphaRoster), but I have no idea how to
write the criteria statement as you have listed. To compound the problem,
the rank field doesn't have paygrades, it has ranks (i.e. SSGT, MAJ, LCPL,
HM3(for Navy)), so I'm assuming that in the criteria statement I will have to
manually type in every possible rank combination that could apply to say E5 &
below. Unless I create a new table with all the rank combinations I can
expect and set the relationships up (would that even work?).

:

Part 1 ---
In the query for the report have two sets of criteria - Option Group number
and Grade criteria.
Example --
0 Like "*"
1 >"E5"
2 >"O0"
3 <"E6"
5 [Forms]![YourFormName]![YourListBox]
You will need the code for multi-select.

Part 2 - Check-In Date
Here again you need the code for multi-select.

Part 3 - Sorting
Access reports ignores sorts in done in queries for the most part so you
might need to use different reports so as to use the report Grouping and
Sorting. Search for more on this.
--
KARL DEWEY
Build a little - Test a little


:

I have a report called Alphabetical Contact Listing with a source table named
Contacts. I would like to create a form that has an option group to filter
that report. The options I would like are:

-Show All
-Show SNCO & Above
-Show Officers
-Show E5 & below
-Custom Rank (Which when selected enables a list box of all available ranks
in the table and I would like the user to be able to select more than one
rank using Ctrl-Click)
-Check-In Date (Which again enables a list box showing available months and
years from a date field which is formatted 6/1/2007 with ability to select
more than one selection)

Once the user presses the Preview Report button, I would like another form
to open up with a Combo box of available fields in the report to sort the
report by (i.e. LastName, CheckInDate, Rank). I looked at the example Sales
Reports Dialog in the Northwinds Database, but it uses an option group based
on several reports already created. I have only one report and want the
option group to filter that report. I don't have any queries created yet
because I've seen examples in the various newsgroups that show queries
written in the code, but I'm still new at this and don't know how to go about
doing that. I know this is asking a lot.
 
G

Guest

Post your SQL.
--
KARL DEWEY
Build a little - Test a little


Gntlhnds said:
Due to the word wrap, I have no clue about that table you wrote and what
needs to go where. I finally fixed the issue with selecting the proper
paygrades, so now I just need to write the criteria in the query. Do I need
just one "Paygrade" field in the query and multiple criteria, or do I need a
seperate "Paygrade" field for each option group? If not, how would the WHERE
statement look for that then? Also, where would I put the multi-select code?

KARL DEWEY said:
Unless I create a new table with all the rank combinations I can expect and
set the relationships up (would that even work?).
Yes, build a translation table like below and join but there are problems --
Rank PayGrade
SFC E7
MAJ O4
LCPL E3
HM3 E3
SSGT E6 Army, E5 Air Force
MSG E8 Army
MSGT E7 Air Force
You might think about adding a pay grade field if you do not have one already.
The report is based on a query now (qryAlphaRoster), but I have no idea how to write the criteria statement as you have listed.
In the design view grid add fields and insert criteria in the rows as below
for your fields --
PayGrade Expr1:
[Forms]![YourFormName]![YourOptionGroup]
Like "*" 0
"E5" 1
"O0" 2
<"E6" 3
[Forms]![YourFormName]![YourListBox] 4


--
KARL DEWEY
Build a little - Test a little

Gntlhnds said:
Thank you for your help. I must admit, though, I'm a little lost. The
report is based on a query now (qryAlphaRoster), but I have no idea how to
write the criteria statement as you have listed. To compound the problem,
the rank field doesn't have paygrades, it has ranks (i.e. SSGT, MAJ, LCPL,
HM3(for Navy)), so I'm assuming that in the criteria statement I will have to
manually type in every possible rank combination that could apply to say E5 &
below. Unless I create a new table with all the rank combinations I can
expect and set the relationships up (would that even work?).

:

Part 1 ---
In the query for the report have two sets of criteria - Option Group number
and Grade criteria.
Example --
0 Like "*"
1 >"E5"
2 >"O0"
3 <"E6"
5 [Forms]![YourFormName]![YourListBox]
You will need the code for multi-select.

Part 2 - Check-In Date
Here again you need the code for multi-select.

Part 3 - Sorting
Access reports ignores sorts in done in queries for the most part so you
might need to use different reports so as to use the report Grouping and
Sorting. Search for more on this.
--
KARL DEWEY
Build a little - Test a little


:

I have a report called Alphabetical Contact Listing with a source table named
Contacts. I would like to create a form that has an option group to filter
that report. The options I would like are:

-Show All
-Show SNCO & Above
-Show Officers
-Show E5 & below
-Custom Rank (Which when selected enables a list box of all available ranks
in the table and I would like the user to be able to select more than one
rank using Ctrl-Click)
-Check-In Date (Which again enables a list box showing available months and
years from a date field which is formatted 6/1/2007 with ability to select
more than one selection)

Once the user presses the Preview Report button, I would like another form
to open up with a Combo box of available fields in the report to sort the
report by (i.e. LastName, CheckInDate, Rank). I looked at the example Sales
Reports Dialog in the Northwinds Database, but it uses an option group based
on several reports already created. I have only one report and want the
option group to filter that report. I don't have any queries created yet
because I've seen examples in the various newsgroups that show queries
written in the code, but I'm still new at this and don't know how to go about
doing that. I know this is asking a lot.
 

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

Similar Threads


Top