Parameter queries with custom dialogs

  • Thread starter Thread starter Luther
  • Start date Start date
L

Luther

Hello,

I am trying to design this custom query; here is the
scenario:
1. I already have a report that would display all of the
database; works well.
2. There is also a menu button for that report
What I would like to do is this:
When the menu button is clicked, the following happens:
1. it should open a small form that would give me 2
options:
a. command button for all records
b. parameter that gives the user a place to type the value
(in this case 'STATE=??'

When all said and done, the user will see the report
depending on what they chose. I am trying to wrap my head
around this concept, and needs some assistance to figure
this out.

Thanks.
 
Hi Luther,
You can do this with your single existing report with a
filter prompt something like:

[STATE] =[State=? - or leave blank for all]

The parameter statement above would be in the "filter"
property of the report, with the "filter on" property set
to yes. When the button runs the report, the user can
either supply a STATE name or leave the prompt empty. If
the former, only the selected STATE will be reported; if
the latter, all STATEs will be reported.

Let me know if this will work for you, or if you need more
discussion. You can also do this through a query using
the same prompt in the STATE criteria, and then the query
feeds the report with the same result.
 
Thank you for responding...Strange enough, the "filter"
solution you provided is working well, but...When left
blank, the parameter give a blank report (incorrect),
where when supplied with a state name, it reports that
state (correct).
Is there anything missing there, please?
-----Original Message-----
Hi Luther,
You can do this with your single existing report with a
filter prompt something like:

[STATE] =[State=? - or leave blank for all]

The parameter statement above would be in the "filter"
property of the report, with the "filter on" property set
to yes. When the button runs the report, the user can
either supply a STATE name or leave the prompt empty. If
the former, only the selected STATE will be reported; if
the latter, all STATEs will be reported.

Let me know if this will work for you, or if you need more
discussion. You can also do this through a query using
the same prompt in the STATE criteria, and then the query
feeds the report with the same result.

-----Original Message-----
Hello,

I am trying to design this custom query; here is the
scenario:
1. I already have a report that would display all of the
database; works well.
2. There is also a menu button for that report
What I would like to do is this:
When the menu button is clicked, the following happens:
1. it should open a small form that would give me 2
options:
a. command button for all records
b. parameter that gives the user a place to type the value
(in this case 'STATE=??'

When all said and done, the user will see the report
depending on what they chose. I am trying to wrap my head
around this concept, and needs some assistance to figure
this out.

Thanks.
.
.
 
Hi Luther,
Try this instead:
[STATE] like [State=? - or leave blank for all]&"*"

I borrowed some code that was for a slightly different
outcome and forgot the * for the general case. Actually,
this version should work even if the user supplies only
the first few unique characters. Eg, if STATE is spelled
out in the data base, then 'penn' would report
Pennsylvania only. If you use 2 letter postal codes, then
you'd need both characters, of course.

Please let me know if this works for you.
-----Original Message-----
Thank you for responding...Strange enough, the "filter"
solution you provided is working well, but...When left
blank, the parameter give a blank report (incorrect),
where when supplied with a state name, it reports that
state (correct).
Is there anything missing there, please?
-----Original Message-----
Hi Luther,
You can do this with your single existing report with a
filter prompt something like:

[STATE] =[State=? - or leave blank for all]

The parameter statement above would be in the "filter"
property of the report, with the "filter on" property set
to yes. When the button runs the report, the user can
either supply a STATE name or leave the prompt empty. If
the former, only the selected STATE will be reported; if
the latter, all STATEs will be reported.

Let me know if this will work for you, or if you need more
discussion. You can also do this through a query using
the same prompt in the STATE criteria, and then the query
feeds the report with the same result.

-----Original Message-----
Hello,

I am trying to design this custom query; here is the
scenario:
1. I already have a report that would display all of the
database; works well.
2. There is also a menu button for that report
What I would like to do is this:
When the menu button is clicked, the following happens:
1. it should open a small form that would give me 2
options:
a. command button for all records
b. parameter that gives the user a place to type the value
(in this case 'STATE=??'

When all said and done, the user will see the report
depending on what they chose. I am trying to wrap my head
around this concept, and needs some assistance to figure
this out.

Thanks.
.
.
.
 
You're very welcome, and glad to hear it does the job.
Good luck.
-----Original Message-----
Thank you sooooo much. Works like a charm. I kind of had
an idea about "like", but wasn't sure of the syntax. It's
good to know that there are experts like you to lean on
for support.
-----Original Message-----
Hi Luther,
Try this instead:
[STATE] like [State=? - or leave blank for all]&"*"

I borrowed some code that was for a slightly different
outcome and forgot the * for the general case. Actually,
this version should work even if the user supplies only
the first few unique characters. Eg, if STATE is spelled
out in the data base, then 'penn' would report
Pennsylvania only. If you use 2 letter postal codes, then
you'd need both characters, of course.

Please let me know if this works for you.
-----Original Message-----
Thank you for responding...Strange enough, the "filter"
solution you provided is working well, but...When left
blank, the parameter give a blank report (incorrect),
where when supplied with a state name, it reports that
state (correct).
Is there anything missing there, please?

-----Original Message-----
Hi Luther,
You can do this with your single existing report with
a
filter prompt something like:

[STATE] =[State=? - or leave blank for all]

The parameter statement above would be in the "filter"
property of the report, with the "filter on" property set
to yes. When the button runs the report, the user can
either supply a STATE name or leave the prompt empty. If
the former, only the selected STATE will be reported; if
the latter, all STATEs will be reported.

Let me know if this will work for you, or if you need
more
discussion. You can also do this through a query using
the same prompt in the STATE criteria, and then the query
feeds the report with the same result.


-----Original Message-----
Hello,

I am trying to design this custom query; here is the
scenario:
1. I already have a report that would display all of
the
database; works well.
2. There is also a menu button for that report
What I would like to do is this:
When the menu button is clicked, the following happens:
1. it should open a small form that would give me 2
options:
a. command button for all records
b. parameter that gives the user a place to type the
value
(in this case 'STATE=??'

When all said and done, the user will see the report
depending on what they chose. I am trying to wrap my
head
around this concept, and needs some assistance to figure
this out.

Thanks.
.

.

.
.
.
 
Back
Top