query q

J

joe

i was hoping that someone here might be able to tell me
how to use a inputbox in a query so that the end user can
type in what they want to return. do i need to do a sql
statement or a vb code. using access 2k2 thanks
 
J

John Vinson

i was hoping that someone here might be able to tell me
how to use a inputbox in a query so that the end user can
type in what they want to return. do i need to do a sql
statement or a vb code. using access 2k2 thanks

This is called a "Parameter Query" and it's widely used. Create a
Query with

[Enter a search term:]

on the Criteria line (or any other prompt that you want the user to
see). When they run the query, or (better) when they open a Form or
Report based on the query, they'll be prompted and the query will
search for what they enter.
 
S

Steve Schapel

Joe,

If you mean you want the user to be prompted to enter a value to be
used as a criteria in the query, you can do this by simply entering
the words you want prompter, enclosed in []s, in the criteria of the
applicable field in the query design. For example, [which category?].
This is known as a Parameter Query.

- Steve Schapel, Microsoft Access MVP
 
Top