Parameter Queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Acess 2003 and have become quite familiar with it in the past few
weeks. I am trying to do a database for someone I work with who is picky and
I am trying to create a query that asks you what criteria you want it to
show. The only problem I have is that the one I am making this for doesn't
want to type out the entire word(s) everytime and would like a way to just
type the first few letters and have it go from there. For example, I need to
see everything that is in the under "Construction" and it will take me there
if I type out "Construction" but is there a way to get it to take me to the
same data by just typing in "Con" when my little box pops up asking me for
what I want to view?
 
Yes. Like [Enter Value] & "*"
Keep in mind that this will match everything that you put in, so it is
possible that you will get some "unwanted" results. Putting in Con for
example would bring back
Construction
Concrete
Contact Paper
Cones
Etc

Hope that helps!
 
Here's an example using the Categories table from the Northwind database ...

SELECT Categories.*, Categories.CategoryName
FROM Categories
WHERE (((Categories.CategoryName) Like [Category Name?] & "*"))

See 'Like Operator' in the Access help file for more information.
 
I am using Acess 2003 and have become quite familiar with it in the past few
weeks. I am trying to do a database for someone I work with who is picky and
I am trying to create a query that asks you what criteria you want it to
show. The only problem I have is that the one I am making this for doesn't
want to type out the entire word(s) everytime and would like a way to just
type the first few letters and have it go from there. For example, I need to
see everything that is in the under "Construction" and it will take me there
if I type out "Construction" but is there a way to get it to take me to the
same data by just typing in "Con" when my little box pops up asking me for
what I want to view?

You could use a LIKE and teach the users to type in Con*.

Or you can avoid parameter queries entirely and create a form to prompt
for the report's selection criteria. See the "Report Selection
Example" download at
http://www.jstreettech.com/cartgenie/pg_developerDownloads.asp for one
way to do it.
 
In the criteria put:

Like [Enter a Little Something You Lazy Jerk] & "*"

You must use that exact verbiage. ;-)
 
I have the same type of issue except I made an intermediate form with combo
boxes for my parameters but my query wont feed off my form. When I enter the
parameter information and click ok the query still prompts for all 4 of my
parameters any way. Do you have any ideas??

 
When using a form for your parameters, the syntax for the criteria is
Forms!YourFormName!YourComboBoxName
Make sure that everything is spelled correctly and that the names in
your query match the names on the form.

Hope that helps!
 
This is what I have and it still prompts for the criteria after entering the
values on the form. This is how I have the criteria entered.
[Forms]![Carrier Rate]![Ship To Country]. Everything is spelt and even same
case type. Any ideas.
 
Is the form Carrier Rate open when you try to run the query? If not,
it needs to be.

This is what I have and it still prompts for the criteria after entering the
values on the form. This is how I have the criteria entered.
[Forms]![Carrier Rate]![Ship To Country]. Everything is spelt and even same
case type. Any ideas.

Jeff L said:
When using a form for your parameters, the syntax for the criteria is
Forms!YourFormName!YourComboBoxName
Make sure that everything is spelled correctly and that the names in
your query match the names on the form.

Hope that helps!
 
Is this an MDB or an ADP?

--
Brendan Reynolds
Access MVP

jborron said:
This is what I have and it still prompts for the criteria after entering
the
values on the form. This is how I have the criteria entered.
[Forms]![Carrier Rate]![Ship To Country]. Everything is spelt and even
same
case type. Any ideas.

Jeff L said:
When using a form for your parameters, the syntax for the criteria is
Forms!YourFormName!YourComboBoxName
Make sure that everything is spelled correctly and that the names in
your query match the names on the form.

Hope that helps!
 
Back
Top