Connecting Tech Pros Worldwide Help | Site Map

Question: Parameter value query?

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 09:23 PM
thomas goodwin
Guest
 
Posts: n/a
Default Question: Parameter value query?

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, 09:23 PM
Allen Browne
Guest
 
Posts: n/a
Default 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, 09:23 PM
David B
Guest
 
Posts: n/a
Default 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, 09:23 PM
David W. Fenton
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.