Create a counter without binding it to a table.

P

Paul S

I want to create a counter on a form which tracks how many times it is
opened. The form is not bound to a table, nor do I want to bind the counter
to one either. Any help would be appreciated.
 
A

Allen Browne

It would probably make better sense to use a table to store this, but if you
don't want to, you could create a custom property on the Form, and in
increment it in Form_Open.

If creating custom properties is new, here's a starting point:
http://allenbrowne.com/ser-09.html
 
L

Linq Adams via AccessMonster.com

If you only want to track how many times the form is opened during a single
session of the database being used, you could use a global variable. If you
want to track how many times the form is opened during multiple sessions of
opening and closing and opening the database again, you'll have to store the
information in a table.
 
P

Paul S

Thanks Allen, I'll give it a try...

Allen Browne said:
It would probably make better sense to use a table to store this, but if you
don't want to, you could create a custom property on the Form, and in
increment it in Form_Open.

If creating custom properties is new, here's a starting point:
http://allenbrowne.com/ser-09.html
 
Top