Sorting

  • Thread starter Thread starter Josh
  • Start date Start date
J

Josh

Is there a way to use a drop down menu in a query so that
my users can search for records containing one of the
accepted codes without them having to memorize it? I was
hoping to make seperate reports for the users and I didn't
want to make 70 some seperate queries if the user could
just select the code from a drop down box. Thanks
 
Josh,

Use a form with a Command Button to print your reports and
a Combo Box that that is a list of all codes used for
printing. I assume these are stored in a table.

The value of the Combo Box can be passed to your query on
the cirteria line of the codes field as shown below:

=Forms!MyForm!MyComboBox

The Command Button to print reports On Click event would
be coded as shown below:

DoCmd.OpenReport "MyReport", acViewNormanl

Hope this helped.

ET Sherman
 
Is there a way to use a drop down menu in a query so that
my users can search for records containing one of the
accepted codes without them having to memorize it? I was
hoping to make seperate reports for the users and I didn't
want to make 70 some seperate queries if the user could
just select the code from a drop down box. Thanks

Certainly, and it's a very standard technique.

Create a small form, let's call it frmCrit; don't base it on any
table, just choose the option to create a new form from scratch.

Put on it a Combo Box control based on your table of codes, let's call
it cboCrit.

Create a Query with a criterion

=Forms!frmCrit!cboCrit

on the codes field.

Base a Form (for onscreen use) or a Report (for printing) on this
query, and use the Command Button Wizard to put a command button on
frmCrit to open this Form or Report to display the results.
 
Back
Top