sorting by combo boxes

  • Thread starter Thread starter bomantas
  • Start date Start date
B

bomantas

I have an access file which needs to be sorted by three differen
factors. All of these factors are in combo boxes, the first is by "D
or "P", second, "MC","CC","KC","HC" and third, by months. So what
need to know is how to chose from the first box, then second, and th
third then clicking on a button to sort it in a report. Can anyon
help? So to recap, I need to know how to make the combo box entrie
have factors in each. Then, I need to know how to make the butto
work. Please give me the answer in the most simplest way because
have hardly any knowledge of access.
Thanks,
Mar
 
This is all relatively simple functions. If you're new to
Access, you should pick up a book or few to help learn it
and all of these should be easy to find in them.

ComboBoxes - Use the Wizard to build them and you'll be
offered the option of entering the values you want in the
drop-down or looking them up in a table or query. Don't
forget to set the LimitToList property to Yes (so the user
can't enter a value not already in the drop-down).

Report & Source Query - It sounds like what you want to do
is filter a report by the criteria selected in your
ComboBoxes. This isn't usually done in the report but in
the source query the report uses.
When you build a query in design view, you can set the
criteria you want for each field. Also, instead of
changing the query every time you switch from "CC"
to "KC", you can use a value on a form as the criteria. I
do this a lot with dates so I can use the same query and
report for daily, weekly, monthly , quarterly and annual
reporting.
If you right-click in the Criteria line, you are offered
the option of Build... This opens a builder window which
will let you select the form and control you want to use.
The syntax is: [Forms]![FormName]![ControlName].
So, criteria for Field1 will be [Forms]![YourFormName]!
[Combo1]. For Field2 [Forms]![YourFormName]![Combo2], and
so on.

Running a Report from a CommandButton - If you use the
Wizard to build the CommandButton, you will be walked
through 'what do you want the button to do?' and running a
specific report is one of the options.

Hope this helps!

Howard Brody
 
Back
Top