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
|
|||
|
|||
Displaying Query parameters on a form
Hello.
Ive displayed the parameters of a query on a report before, simply by entering the name of the parameter in the control source of a textbox. However, that approach does not seem to work if i want to display the query parameters on a form. cheers, WebDude! |
#2
|
|||
|
|||
Hi.
However, that approach does not seem to work if i want to display the query parameters on a form. This isn't the answer you want to hear, but there's no way to retrieve the parameters that were used to create the record source for the form, because the query "has already run." The workaround is to add these parameters as field names in the query so that text boxes can be bound to these fields on the form. For example: PARAMETERS [PopState] Text ( 10 ); SELECT Population, [Enter City:], PopState FROM tblPopulations WHERE ((City Like "*" & [Enter City:] & "*") AND (State LIKE "*" & PopState & "*")); As you can see, it will work with both formal parameters and input parameters. HTH. Gunny See http://www.QBuilt.com for all your database needs. See http://www.Access.QBuilt.com for Microsoft Access tips. (Please remove ZERO_SPAM from my reply E-mail address so that a message will be forwarded to me.) - - - If my answer has helped you, please sign in and answer yes to the question "Did this post answer your question?" at the bottom of the message, which adds your question and the answers to the database of answers. Remember that questions answered the quickest are often from those who have a history of rewarding the contributors who have taken the time to answer questions correctly. "WebDude" wrote: Hello. Ive displayed the parameters of a query on a report before, simply by entering the name of the parameter in the control source of a textbox. However, that approach does not seem to work if i want to display the query parameters on a form. cheers, WebDude! |
#3
|
|||
|
|||
That does seem like a round-a'bout way,
but im a desperate man in desperate times. And desperate times call for desperate measures.. and your idea sounds crazy enough it just might work. So, if you dont hear back from me within 36hours, dont panic!! WebDude. "'69 Camaro" wrote: Hi. However, that approach does not seem to work if i want to display the query parameters on a form. This isn't the answer you want to hear, but there's no way to retrieve the parameters that were used to create the record source for the form, because the query "has already run." The workaround is to add these parameters as field names in the query so that text boxes can be bound to these fields on the form. For example: PARAMETERS [PopState] Text ( 10 ); SELECT Population, [Enter City:], PopState FROM tblPopulations WHERE ((City Like "*" & [Enter City:] & "*") AND (State LIKE "*" & PopState & "*")); As you can see, it will work with both formal parameters and input parameters. HTH. Gunny See http://www.QBuilt.com for all your database needs. See http://www.Access.QBuilt.com for Microsoft Access tips. (Please remove ZERO_SPAM from my reply E-mail address so that a message will be forwarded to me.) - - - If my answer has helped you, please sign in and answer yes to the question "Did this post answer your question?" at the bottom of the message, which adds your question and the answers to the database of answers. Remember that questions answered the quickest are often from those who have a history of rewarding the contributors who have taken the time to answer questions correctly. "WebDude" wrote: Hello. Ive displayed the parameters of a query on a report before, simply by entering the name of the parameter in the control source of a textbox. However, that approach does not seem to work if i want to display the query parameters on a form. cheers, WebDude! |
#4
|
|||
|
|||
Displaying Query parameters on a form
Sorry to butt in, but I read about this this morning.
If you go to this site, it will explain how to get that criteria to list in a report. http://www.techonthenet.com/access/reports/parm_rpt.php Hope this helps! ~Beth "WebDude" wrote: Hello. Ive displayed the parameters of a query on a report before, simply by entering the name of the parameter in the control source of a textbox. However, that approach does not seem to work if i want to display the query parameters on a form. cheers, WebDude! |
#5
|
|||
|
|||
Displaying Query parameters on a form
hehe i posted that 4 years ago :-D
but any replies are apperciated :-) and nice link btw :-) Cheers, WeeeeeeeeeebDude away! "Beth Eadie" wrote: Sorry to butt in, but I read about this this morning. If you go to this site, it will explain how to get that criteria to list in a report. http://www.techonthenet.com/access/reports/parm_rpt.php Hope this helps! ~Beth "WebDude" wrote: Hello. Ive displayed the parameters of a query on a report before, simply by entering the name of the parameter in the control source of a textbox. However, that approach does not seem to work if i want to display the query parameters on a form. cheers, WebDude! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Form for Inputing query parameters. | Karthik | General Discussion | 2 | September 4th, 2005 04:25 AM |
Passing parameters from a form built on a crosstab query | ihrigt | General Discussion | 0 | April 25th, 2005 04:13 AM |
Design help, please | SillySally | Using Forms | 27 | March 6th, 2005 05:11 AM |
update queries and forms | Mary Pode | Database Design | 16 | February 2nd, 2005 06:25 PM |
Big number gives error! | Sara Mellen | Running & Setting Up Queries | 8 | October 11th, 2004 02:48 AM |