If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Parameter queries with custom dialogs
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. |
#2
|
|||
|
|||
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. . |
#3
|
|||
|
|||
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. . . |
#4
|
|||
|
|||
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. . . . |
#5
|
|||
|
|||
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. . . . . |
#6
|
|||
|
|||
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. . . . . . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Filling out one parameter, selecting multiple queries | Paul van der Heijden | Running & Setting Up Queries | 2 | September 9th, 2004 09:15 AM |
Refresh All with parameter queries | Patti | General Discussion | 0 | August 10th, 2004 08:38 PM |
Using Forms for Parameter Queries | Jon | Using Forms | 0 | August 6th, 2004 03:58 AM |
parameter queries | seeker53 | Running & Setting Up Queries | 5 | July 7th, 2004 09:35 PM |