User information in a query

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

Guest

Hello everyone

I am new to access. I have created a set of tables and a query. Very basic stuff and it all works fine.

I would like to progress to where the user (someone other than me) types in the criteria of the query and then the query selects the matches and returns only the matches that correspond to the user supplied values. An interactive query...

Can anyone point me in the right direction

Thanks

....Sandra
 
Hi Sandra,
Glad to see that someone else is having a bash at this program as well as
me!
What you are refering to is a "Parameter Query"...the user fills in the
"Parameter"
How you do this is to set up a query in the normal way, however, whilst in
the Design View of your Query, you include, for example, the following as
the criteria for the field upon which you wish to perform th efilter...

[enter "what you are looking to match"] ('though without the quotes). When
you run the query, a dialog box will pop up asking you to input what you are
looking for.

So, for example, if you had included, as part of your query a table of
customer details and one of the fields was the customer's city location,
then in the Criteria grid for the field "City" you could include something
like this...
[Please input the city that you are looking for]

When the user runs the query, he/she is prompted to input a city...if they
input, for example, London, then all of those Customers who were based in
London would be shown.

Incidentally, if th euser inputs *, then all results are shown.

Hope that this helps.
Regards
Colin Foster

Sandra said:
Hello everyone,

I am new to access. I have created a set of tables and a query. Very basic stuff and it all works fine.

I would like to progress to where the user (someone other than me) types
in the criteria of the query and then the query selects the matches and
returns only the matches that correspond to the user supplied values. An
interactive query....
 
Back
Top