How to Query a column in Access

afortney

Registered User.
Local time
Today, 15:03
Joined
Aug 2, 2001
Messages
12
I need to Query out a columns worth of data inside of Access, How ? I can create a Query and pull up all the data but I only want to pull up let's say col1 has values from 1 to 1000 I only want to see 50 how do I do that ?
 
If you're using the query design view, type 50 in the criteria line for the column in question.
 
I need to have a free form text box come up and ask the user what he/she want to query for.
 
Have you tried a parameter query? In the Access query design window, in the criteria line for the field, enter something like this:
[Please enter the value to search for:]

When the query is run, Access will bring up a text box where a user can enter a value. The limitation is that (I'm pretty sure) you cannot enter an expression like "Between 10 and 20". You can only enter values unless you use two of those prompts like this:
Between [Please enter low end of range] and [please enter upper end of range].
 
dcx693 said:
In the Access query design window, in the criteria line for the field, enter something like this:
[Please enter the value to search for:]

The answer is there...
 
Hey

Just to see if you still need help.....

The above statement about parameter queries.

[Please enter the value to search for:]

breaks down like this....

Go to the query tab.
Select new, design view or view an existing query in design view.
There will be several rows in the design column
Field
Table
Sort
Show
Criteria and
or

In the box beside criteria, put in
[you prompt]
The []s tell access to ask and the text inside is displayed on the entry box as the question prompt.

In straight SQL......


Select column from table where column = [Enter parameter]

Hope this helps
PB

hope this helps.
 
Re: Hey

pdbowling said:
The []s tell access to ask and the text inside is displayed on the entry box as the question prompt.

It's actually looking for a field that can't be found - you are just entering a value to represent.

[Forms]![frmAForm]![ctlAControl] is within brackets but you never get asked, as a parameter, to enter Forms]![frmAForm]![ctlAControl

:cool:
 
OK, I kinda get it. Could you please show me a steip by step way of doing this ? I get the prompt box up and I enter a value and all it does is populate that value in a box that it made up.
 

Users who are viewing this thread

Back
Top Bottom