Thank you very much. I am really a new hand in Access. But "three tables" is
just in my mind, which has not yet been built up.
What is your suggestion on buiding up one table that could be sorted in
three fields? To make three Queries that can be easily runned? Please give
me detailed instructions.
Be careful using the term "Sort". It has a very specific meaning in
database terms: it means "take a set of records and present them in
some specific sequential order", as in to sort the list alphabetically
by last name, or sort the list in descending order of salary. You are
apparently using the term to mean filter records, or select records.
That will just confuse people!
And if all these items are in one table, how to creat the specific query
then?
If you have three classes of products, simply include a ProductClass
field in your Table. Create a Query based on the table; on the
Criteria line under ProductClass you can put
"Widgets"
to select just the class of Widgets from the table. The resulting
query can be used just as if it were a table; you can view it, edit
it, use it as the basis of a form, and so on.
Or, you can get one step more advanced; put
[Enter product class:]
on the criteria line. When you use the query (say, by opening a form
or report based on it) you will be prompted with the text in the
brackets - the "Parameter" - and if you type Widgets in response,
you'll again get just that class.
Or, even more useful but a bit more work: create a little unbound form
named frmCrit. Put a Combo Box on it, named cboClass, with the three
(or more) product classes as options. Use a criterion of
[Forms]![frmCrit]![cboClass]
and put a button on frmCrit to open a Report or Form displaying the
desired data. The query will use whatever value the user selected to
filter the table and display those results.
John W. Vinson[MVP]