473,289 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

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

Nov 12 '05 #1
3 3081
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" <to*********@unc.edu> wrote in message
news:40********@news.unc.edu...
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

Nov 12 '05 #2

thomas goodwin <to*********@unc.edu> wrote in message
news:40********@news.unc.edu...
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


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


Nov 12 '05 #3
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in
news:40***********************@freenews.iinet.net. au:
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]


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
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: deko | last post by:
For some reason this does not seem to be working... Am I missing something basic? Dim rst As DAO.Recordset Dim db As DAO.Database Set db = CurrentDb Set rst = db.OpenRecordset("qryEmailS") '...
3
by: thomas goodwin | last post by:
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)...
2
by: rg | last post by:
Hi all, I have query about passing a parameter from form to a query. My situation is as follows: I have a query that pulls up some data from a table, however there is a condition that must...
2
by: Robert Smith jr. | last post by:
Hello, Please pardon my newbie question ... I am building an ASP.NET page that displays a recordset with a Delete statement enabled (this all works fine). I want to Insert the current row...
5
by: ric_deez | last post by:
Hi there, I would like to create a simple search form to allow users to search for a job number based on a number of parameters. I think I understand how to use parameteres associated with Stored...
5
by: John | last post by:
Hi I have a parameterised query for a report like this; PARAMETERS Event_ID Short; SELECT DISTINCTROW Events., ... FROM Events WHERE (((Events.)=)); Now I am trying to run the report...
8
by: rbg | last post by:
I did use query plans to find out more. ( Please see the thread BELOW) I have a question on this, if someone can help me with that it will be great. In my SQL query that selects data from table,...
4
by: allanx38 | last post by:
I have a query that uses a value from a form as a criteria. For example looking for all customers belonging to a particular party. the criteria on the QBE looks like !! I am trying to open the...
5
n8kindt
by: n8kindt | last post by:
this is a very basic question but i might be making it more complicated than it should be. if i were to have a query with the following code SELECT Tbl1.ID, Tbl1., Tbl1. FROM Tbl1 WHERE...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.