Running Total

  • Thread starter Thread starter George
  • Start date Start date
G

George

Hi All,
I have a form that tracks individual's nights spent in
homeless shelters. The form is a subform of a main
client form. The subform is based on a table that is on
the many side of a one-to-many relationship with the main
client table. What I need is a snippet of code or a hint
as to how to calculate a running total of nights spent in
shelters. For example: Client spends 2 nights in
shelter A: bed nights = 2, running total = 2. Client
then moves to another shelter and spends 4 nights there:
bed nights = 4, running total = 6.

Can anyone help?? Thanks in advance.
 
-----Original Message-----
Hi All,
I have a form that tracks individual's nights spent in
homeless shelters. The form is a subform of a main
client form. The subform is based on a table that is on
the many side of a one-to-many relationship with the main
client table. What I need is a snippet of code or a hint
as to how to calculate a running total of nights spent in
shelters. For example: Client spends 2 nights in
shelter A: bed nights = 2, running total = 2. Client
then moves to another shelter and spends 4 nights there:
bed nights = 4, running total = 6.

Can anyone help?? Thanks in advance.
.
If each of the clients bed nights is a separate entry in
the database then use the expression builder in the
running total textbo;it should be something like this
=sum(bednights)

If the data is written over each entry then you will need
a separate field to keep track of the totals that will
increment when the location is changed.

I hope this helps.
 
Back
Top