Connecting Tech Pros Worldwide Help | Site Map

Question: Parameter value query?

  #1  
Old November 12th, 2005, 10:23 PM
thomas goodwin
Guest
 
Posts: n/a
I have a query which asks for a parameter value to execute it.
To see the results I have to:
a) click on the query -- the "Enter Parameter Value" window pops up.
b) enter the parameter value
c) look at results in datasheet view

If I want to run the query again, I must
d) click to close the datasheet view
e) click on the query
f) enter the parameter value
g) look at results in datasheet view

Question: Is there a way to cut the number of steps in d) e) f) g) ?

thanks,
tom g

  #2  
Old November 12th, 2005, 10:23 PM
Allen Browne
Guest
 
Posts: n/a

re: Question: Parameter value query?


Refer to a text box on a form instead of using a parameter.

Typically you type something like this into the Criteria row in query
design:
[Forms]![MyForm]![MyTextbox]

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"thomas goodwin" <tom_goodwin@unc.edu> wrote in message
news:408001ce_3@news.unc.edu...[color=blue]
> I have a query which asks for a parameter value to execute it.
> To see the results I have to:
> a) click on the query -- the "Enter Parameter Value" window pops up.
> b) enter the parameter value
> c) look at results in datasheet view
>
> If I want to run the query again, I must
> d) click to close the datasheet view
> e) click on the query
> f) enter the parameter value
> g) look at results in datasheet view
>
> Question: Is there a way to cut the number of steps in d) e) f) g) ?
>
> thanks,
> tom g[/color]


  #3  
Old November 12th, 2005, 10:23 PM
David B
Guest
 
Posts: n/a

re: Question: Parameter value query?



thomas goodwin <tom_goodwin@unc.edu> wrote in message
news:408001ce_3@news.unc.edu...[color=blue]
> I have a query which asks for a parameter value to execute it.
> To see the results I have to:
> a) click on the query -- the "Enter Parameter Value" window pops up.
> b) enter the parameter value
> c) look at results in datasheet view
>
> If I want to run the query again, I must
> d) click to close the datasheet view
> e) click on the query
> f) enter the parameter value
> g) look at results in datasheet view
>
> Question: Is there a way to cut the number of steps in d) e) f) g) ?
>
> thanks,
> tom g[/color]

Much prefer doing this from a form.
Place a text box on a form (frmsearch). Call it say txtsearch.

in the query criteria put [Forms]![frmsearch]![txtsearch] - assuming you have
the names above.

by viewing query results in a form you have many more options as to how the data
is displayed.

So create a new form and use your query as it`s record source. the wizard will
do this for you.

On your search form add a command button to open your results form.
Depending on what you are seaching for using a combo box to select the criteria
works well.

You can also add 2 text boxes (formated to date) on your search form which
allows you to search between 2 dates

You would need something like this in the query date field criteria - Between
[Forms]![frmsearch]![firstdate] And [Forms]![frmsearch]![lastdate]

HTH
David B




  #4  
Old November 12th, 2005, 10:23 PM
David W. Fenton
Guest
 
Posts: n/a

re: Question: Parameter value query?


"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in
news:40800d11$0$16572$5a62ac22@freenews.iinet.net. au:
[color=blue]
> Refer to a text box on a form instead of using a parameter.
>
> Typically you type something like this into the Criteria row in
> query design:
> [Forms]![MyForm]![MyTextbox][/color]

You can improve the performance of a query by defining the argument
as a parameter and typing it. I do this whenever I save a query that
is filtered on a form field.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameter value question mickelingon answers 4 November 14th, 2006 11:21 PM
How to pass parameter to DataSet via user control? answers 1 November 19th, 2005 03:09 PM
Question: Parameter value query? thomas goodwin answers 3 November 12th, 2005 10:50 PM
Passing parameters to nested parameter queries WGW answers 3 July 20th, 2005 03:39 AM