A custom form to open a report with multiple criteria from a query

B

BJM

I have a report that simulates a form letter to facilitate
teachers sending out letters of concern for absences. Most
of our staff are not comfortable with using an Access
databse, so asking them to provide answers to an endless
stream of parameter boxes to choose week numbers, course
codes, and teacher/student names in order to filter out
all but those students they want to send letters to would
give them hives!

I understand there is a way to create a custom form that
an end user could then fill out, sending the values of
filled in textbox fields to become the criteria for a
query.

Could someone set me on the right track to learning how to
create such a form that could be run from a touch of a
switchboard button?

Thanks very much,
BJM
 
T

tina

suggest you write the query first as a parameter query, testing it to make
sure it returns the records you want when the appropriate parameters are
provided.
then create an unbound form. add unbound textboxes to hold the values you
want the user to enter for the query parameters. note: if you can provide
combo boxes for the user to choose values from (such as a list of week
numbers, a list of course codes, etc), that will help make it easier for
your user to enter appropriate values.
next, go back to the query and change each parameter criteria to the
corresponding control on the form, with syntax as
Forms!MyUnboundFormName!MyUnboundControlName
substitute the correct form and control names, of course.
put a command button on the form to open the report that's bound to the
query. suggest you include code to check that all required values are
present in the form's controls before the OpenReport command runs.
the form is just a form like any other, so you can open it from your
switchboard with a simple OpenForm action.

hth
 

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