Question Including a count at end of category in list box

josephbupe

Registered User.
Local time
Today, 15:24
Joined
Jan 31, 2008
Messages
247
Hi,

Given the following tables:

T_Personnel
PersonnelID=PK
Family Name=text

T_Divisions
DivisionID=PK
DivisionName=txt

T_Stations
StationID=PK
StationName=txt

The three tables above are linked as follows:

T_PersonnelTransfers
TransferID=PK
PersonnelID=FK
DivisionID=FK
StationID=FK

How can i add a total number of Persons under a given Station so that the number appears in blankets at the end of each Station in a list box?

Joseph
 
Could you set up the source of the list box as a query with the personnel count included? Should be able to inner join PersonnelTransfers with Stations, group on StationID and/or StationName, then count PersonnelID.
 
Hi,

Given the following tables:

T_Personnel
PersonnelID=PK
Family Name=text

T_Divisions
DivisionID=PK
DivisionName=txt

T_Stations
StationID=PK
StationName=txt

The three tables above are linked as follows:

T_PersonnelTransfers
TransferID=PK
PersonnelID=FK
DivisionID=FK
StationID=FK

How can i add a total number of Persons under a given Station so that the number appears in blankets at the end of each Station in a list box?

Joseph

you can do a query for the counts and then add it in with the postbox row source linked on StationIF.

SELECT StationID, Count (StationID) As StationCount
FROM T_PersonnelTransfer
GROUP BY StationID
 

Users who are viewing this thread

Back
Top Bottom