help wanted with report

B

Bob Matthews

I have the following fields in a shipping immigration database:-

1) date of immigration
2) ship's name
3) City
4) State

The database has many records one for each individual who has immigrated

I require a report which looks like the following :-

Date Ship's Name City State No. of Passengers

1/1/1860 "Columbia" Port Chalmers Otago 152
3/1/1860 "Avon" Port Chalmers Otago 213
etc.

How do I produce such a report?

Bob
 
R

Rob Parker

Hi Bob,

I assume that the table containing those fields also contains a field (eg.
Passenger) which contains a unique identifier for each passenger. If so,
create a totals query containing the fields you described, and including the
Passenger field; set each of the fields you showed as "Group By " in the
query, and set "Count" for the Passenger field. Base your report on that
query.

The SQL view for your query will be something like:
SELECT ImmigrationDate, ShipName, City, State, Count(Passenger)
FROM YourTableName
GROUP BY ImmigrationDate, ShipName, City, State;

Substitute your table and field names as appropriate. If your
ImmigrationDate field is actually named Date, I would strongly suggest that
you change it, since Date is a reserved word in Access. You can alias it as
"Date" in your query, or change the text in the label in the report.

HTH,

Rob
 

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