By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,643 Members | 1,080 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,643 IT Pros & Developers. It's quick & easy.

Trains

P: n/a
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)

Jun 11 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
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)
Jun 12 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.