PDA

View Full Version : Count of records processed during current session


ABC123

Annita Merriweather
12-26-2003, 03:53 PM
How do I show the number of records processed during the current session? I want to see the count on a form as each new record is entered. When A5 is exited, the count should return to zero. Thank you. Annita

Stan Mathews
12-26-2003, 07:10 PM
Form based on table or set? Count of parent records only or parent and child records?

Tom Cone Jr
12-27-2003, 01:17 AM
Count of new records only? New records and changed records? Separate changes to same record count each time?

-- tom

Annita Merriweather
12-29-2003, 04:44 AM
I want to count the parent records, only new records based on the form. Thanks guys.
Annita

Annita Merriweather
12-31-2003, 09:08 AM
Hi Tom,

I want to count new records only. For instance: How many sales were made today? The records are in a table. Thanks Annita

Tom Cone Jr
12-31-2003, 09:22 AM
I've been pondering this.

There are two ways I see that it could be done. In both cases you need to define the requirements more specifically. There's a difference in a running count in each 'session' and a running count for each 'day'. A day could have multiple sessions.

In general however, here are the two approaches:

1) when a session begins initialize a counter variable, then increment each time a new record is begun and then saved. Display the variable on the form. I think this would be easy except for the case where a user begins a new record and then cancels.

2) establish a common field value in all records that are entered in a single 'session' and use tablecount() to calculate the current count of records that have the same field value. The common field value could be a unique session identifier, or more simply, the same 'enter' date.

-- tom

Annita Merriweather
01-06-2004, 04:37 AM
Thank you. I reacted a field and made the default value 1. I used a count expression to show the number of records saved on a form. I probablly could have also totaled the field to determine the number of records saved for the session. Annita