Selecting Query by form

E

Edgar

I am an absolute beginner at access so excuse my
explaining skills.

I have a form that has a list box linked to a table for
sectors. I also want a input box where the user can select
a date range. What I want to do is for the user to select
a sector from the list box and hit a button and for access
to run a query based on that sector querying the volume by
date range which is stored in a seperate table called
prices which is linked to a companies table which is
linked to the sectors table.

I have tried setting up a parameter query but I dont know
how to set this up with 2 parameters and i also dont know
how to pass values from the form to the paramter queries.

TIA
 
K

Kevin Sprinkel

I'm not sure I totally understand your question, but I'll
try. If you need further help, post a followup.

Selection by a parameter query and selection by using an
input form are generally alternative approaches. The
former is quick and dirty, but limited. Using a form
gives you much more flexibility.

To refer to the value in a form control in your query,
enter in the criteria row:

=Forms!<yourformname>!<yourcontrolname>, e.g.,

=Forms!frmCustomers!txtCustomerNumber

For date ranges, use the reserved word Between, e.g.,

=Between Forms!<yourformname>!<startdate> AND Forms!
<yourformname>!<enddate>

HTH
Kevin Sprinkel
 

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