A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Displaying Query parameters on a form



 
 
Thread Tools Display Modes
  #1  
Old August 29th, 2005, 01:01 AM
WebDude
external usenet poster
 
Posts: n/a
Default 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  
Old August 29th, 2005, 03:18 AM
'69 Camaro
external usenet poster
 
Posts: n/a
Default

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  
Old August 29th, 2005, 05:18 AM
WebDude
external usenet poster
 
Posts: n/a
Default

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  
Old May 6th, 2008, 03:42 PM posted to microsoft.public.access.forms
Beth Eadie
external usenet poster
 
Posts: 15
Default 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  
Old May 10th, 2008, 11:37 PM posted to microsoft.public.access.forms
WebDude[_2_]
external usenet poster
 
Posts: 1
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 05:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.