473,394 Members | 1,806 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,394 software developers and data experts.

query parameters

553 512MB
I am setting parameters in Access Query but they wont work.
I run the query, and i get the prompt and in input the required value but the query criteria doesn't change ..

any help?
Aug 9 '07 #1
6 1621
JKing
1,206 Expert 1GB
Post the SQL for the query.
Aug 9 '07 #2
questionit
553 512MB
JKing

nothing's wrong with my SQL query. i meant to say the Parameters feature in Access that we use to set up the parameters... once i have set any parameter, that doesn't make any differenc - the criteria remains the same , why's that
Post the SQL for the query.
Aug 9 '07 #3
JKing
1,206 Expert 1GB
Ok, I'm still unsure of what your problem is. Right now I'm assuming you have a query and within this query in the WHERE clause you have [Enter Value] or some other type of parameter. This is providing a prompt upon running the query to Enter Value. You enter the value yet the query results remain the same and unfiltered.

Is this accurate? If not I'm going to need you to further explain your problem so I can understand what you're doing and help you get your query functioning properly. Examples are very helpful and maybe some insight into what you are doing.

In either case I still think seeing the SQL would be helpful.
Aug 9 '07 #4
questionit
553 512MB
If you open any Query in Design View.
Then goto Menu "Query" then click on "Parameters". Now you see Query Parameters window.... If you put in any field and close it. Now execute the Query, you will be prompted to enter a value. Query will run but the value you entered would not make any difference - the critera wouldn't change.. why ?


Ok, I'm still unsure of what your problem is. Right now I'm assuming you have a query and within this query in the WHERE clause you have [Enter Value] or some other type of parameter. This is providing a prompt upon running the query to Enter Value. You enter the value yet the query results remain the same and unfiltered.

Is this accurate? If not I'm going to need you to further explain your problem so I can understand what you're doing and help you get your query functioning properly. Examples are very helpful and maybe some insight into what you are doing.

In either case I still think seeing the SQL would be helpful.
Aug 9 '07 #5
JKing
1,206 Expert 1GB
If you open any Query in Design View.
Then goto Menu "Query" then click on "Parameters". Now you see Query Parameters window.... If you put in any field and close it. Now execute the Query, you will be prompted to enter a value. Query will run but the value you entered would not make any difference - the critera wouldn't change.. why ?
Adding a parameter this way basically just adds a variable to your query. If you want it to filter your query results you will need to use it in your WHERE clause. Now had you posted your SQL in the first place I could have told you this several posts ago. You're right there probably isn't anything wrong with your SQL.

It probably looks something like this:
Expand|Select|Wrap|Line Numbers
  1. PARAMETERS myValue Text (255);
  2. SELECT field1, field2, field3
  3. FROM table1;
  4.  
So your query is functioning just as you have told it to. It gets the parameter and runs your select. You need to tell it what to do with that parameter.

Expand|Select|Wrap|Line Numbers
  1. PARAMETERS myValue Text (255);
  2. SELECT field1, field2, field3
  3. FROM table1
  4. WHERE field1 = [myValue];
  5.  
Aug 9 '07 #6
questionit
553 512MB
Thanks JKing..........

Adding a parameter this way basically just adds a variable to your query. If you want it to filter your query results you will need to use it in your WHERE clause. Now had you posted your SQL in the first place I could have told you this several posts ago. You're right there probably isn't anything wrong with your SQL.

It probably looks something like this:
Expand|Select|Wrap|Line Numbers
  1. PARAMETERS myValue Text (255);
  2. SELECT field1, field2, field3
  3. FROM table1;
  4.  
So your query is functioning just as you have told it to. It gets the parameter and runs your select. You need to tell it what to do with that parameter.

Expand|Select|Wrap|Line Numbers
  1. PARAMETERS myValue Text (255);
  2. SELECT field1, field2, field3
  3. FROM table1
  4. WHERE field1 = [myValue];
  5.  
Aug 13 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: longtim | last post by:
I have been having endless difficulty creating reports/queries that set any relevent parameters from controls in forms. I am creating an application under access 2003 but will target access...
0
by: Amelyan | last post by:
Root > Parent > Current Can sitemap control loaded from Web.sitemap be enabled to automatically maintain query parameters of previous node? E.g. when user clicks Parent, instead of just...
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...
4
by: amorphous999 | last post by:
I am running Access 2002. I have some reports I would like to be able to run from VBA or interactively. The reports use queries with parameters. When the user runs the report, the parameter...
12
by: Carlos555 | last post by:
I've got a question regarding query parameters: I am trying to filter the master data for items whivh have a specific text sting at the end. I was experimenting with using 'Right(,5)' as part...
6
by: sunil | last post by:
I have a button named Button1, and I wrote an event handler for the OnClick event. protected void Button1_Click(object sender, System.EventArgs e) { this.Response.Redirect("Default.aspx?q=" +...
5
by: dana1 | last post by:
Hello Experts! Does anyone know if there is a way to set the values of query parameters from VBA for a report's recordsource? (i.e., I want to set the values of the parameters and NOT have the...
3
hyperpau
by: hyperpau | last post by:
Hi there guys! I have a Form where there are three comboboxes. This comboboxes are used as references for the parameter of 3 fields in a query. when I hit a command button in my form, it opens...
17
by: NeoAlchemy | last post by:
I am starting to find more web pages that are using a query parameters after the JavaScript file. Example can be found at www.opensourcefood.com. Within the source you'll see: <script...
2
by: raaman rai | last post by:
i have 3 drop dropdown box which is used for searching my database. Either one of them can be selected to perform the search but if none of them is selected it will give an error. Well in reference...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.