abt parameter query

G

Guest

hi
i m new user to ms access can u please tell me in detail how to make a
parameter query , how it works
supposr i have employee table and i wan to c each employee for a particular
manager , and every tine i run the query it asks me for the manager id, and
then shows me the list of all employees working for that manager
 
J

John Vinson

hi
i m new user to ms access can u please tell me in detail how to make a
parameter query , how it works
supposr i have employee table and i wan to c each employee for a particular
manager , and every tine i run the query it asks me for the manager id, and
then shows me the list of all employees working for that manager

Create a new Query based on your table. On the Criteria line under the
manager field put

[Enter manager ID:]

When you open the query Access will prompt the user with whatever text
you have in the square brackets and use what they type as a criterion.

A bit more work but much easier for the user is to use a Form for the
criteria. Create a little unbound (no table) Form named frmCrit. Put a
combo box on it listing all the managers, with the manager's ID as its
bound column; let's call it cboManager. On the criteria line use

=[Forms]![frmCrit]![cboManager]

It's handy to put a command button on frmCrit to open a Form (for
onscreen display) or Report (for printing) based on the query; it is
not necessary to open the query datasheet view at all.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top