Help!

P

Pugwyrm

Hi,

I have a very simple database consisting of two tables - the first has
School_Name, Surname & Forename, the second has all the School names I need
to use (from A-Z)

The first 'Form' consist of a combo box with a link/look-up to the second
table, and then 2 'entry' fields for the surname and forename - therefore
each school has, potentially, lots of people attending said school - simple.

My problem is the report - I need to create a report that will allow you to
select a school (from a drop-down list) and list who is at that school.....

Any ideas please??
 
N

Nikos Yannacopoulos

You will need a form to place the combo on, I'll assume it is called
frmSchoolSelection, and the combo is called cboSchool.
Following that, make a query based on the main table, and in the criterion
line under the School_Name field, type in the following criterion:

[Forms]![frmSchoolSelection]![cboSchool]

This will result in the query "reading" the selected school directly from
the combo on the form. Now base your report on the query you just made, and
you are almost there. I say almost because the next logical step is to add a
command button on your form, using the wizard, to open the report (or two
buttons, one to preview, one to print). This done, the user sees a form with
a combo to select the school, and then clicks on the button next to it and
gets the report; nice and easy.

HTH,
Nikos
 
J

Jeff Boyce

Create a form for "ordering" your report.

Include a combo box with School_Name from your second table.

Create a query on the first table and refer to the value in the combo box on
the "order" form, with something like (your syntax may vary):

Forms!YourOrderFormName!cboYourComboBoxName

You'll use this expression as the criterion for which School you want the
report for.

Build your report, based on the query.

Add a command button to your order form to open the report.

NOTE: this is designed to work when the form is opened.
 
P

Pugwyrm

Excellent!! Sounds soooooo easy when you say it like that!

Cheers mate.
:)

Nikos Yannacopoulos said:
You will need a form to place the combo on, I'll assume it is called
frmSchoolSelection, and the combo is called cboSchool.
Following that, make a query based on the main table, and in the criterion
line under the School_Name field, type in the following criterion:

[Forms]![frmSchoolSelection]![cboSchool]

This will result in the query "reading" the selected school directly from
the combo on the form. Now base your report on the query you just made, and
you are almost there. I say almost because the next logical step is to add a
command button on your form, using the wizard, to open the report (or two
buttons, one to preview, one to print). This done, the user sees a form with
a combo to select the school, and then clicks on the button next to it and
gets the report; nice and easy.

HTH,
Nikos


Pugwyrm said:
Hi,

I have a very simple database consisting of two tables - the first has
School_Name, Surname & Forename, the second has all the School names I need
to use (from A-Z)

The first 'Form' consist of a combo box with a link/look-up to the second
table, and then 2 'entry' fields for the surname and forename - therefore
each school has, potentially, lots of people attending said school - simple.

My problem is the report - I need to create a report that will allow you to
select a school (from a drop-down list) and list who is at that school.....

Any ideas please??
 
Top