So you record the number of passengers who alight and disembark at each
station, and you want to get a count of passengers at any point of the
journey?
Use a subquery to calculate that. (You don't store this in the table.)
Here's an introduction to subqueries:
http://allenbrowne.com/subquery-01.html
The specifics will depend or your structure, but the subquery might end up
like this:
Passengers: (SELECT Sum([PassengerCount])
FROM Table1 AD Dupe
WHERE RouteID = 99
AND Dupe.StopID <= Table1.StopID)
where:
- PassengerCount is the number of passengers who alighted/disembarked at a
stop (could be negative);
- RouteID defines which journey this is;
- StopID is the order of stations in the route.
- The main query also uses Table1.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
<br*************@googlemail.comwrote in message
news:11**********************@m36g2000hse.googlegr oups.com...
>I am converting train information from Excel onto Access. Route, Train
Times and then Station tables.
I am trying to create a form with a subreport which includes an
ongoing calculation (eg last record ongoing passengers with this
record on passengers - off passengers, giving this record's ongoing)