count number of times a form is displayed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm looking for a similar thing to those counters you get on web pages,
showing the number of times a page has been accessed. I want this to be
displayed on the form that displays at startup each time the access database
in question is opened.
TIA
 
Add a table to your database where you can store how many times the form's
been opened.

In the form's Open event, add to that field, then update the field on the
form.
 
Then you would need to add a field to track this and have it increment each
time the form opens. You could add a table and store the date, time, and
UserID each time it is opened, then count those records and display the
results. Not sure if you need that though.

You could add an unbound text box to the form and make it's data the number
1. Then in code, increment that each time the form is opened and replace
the data in the control.

Lots of options. I guess the real question though is what value this will
add to your database. :-)
 
Thanks Doug and Rick. Well, the value at the moment is in knowing how useful
the database is to the user community. It's a project to build an employee
database - and the basic db is up and out there for people to access but
nobody seems to be coming back to me with any feedback (as asked), so I'm
just wondering if it's of no use to them. Therefore, wanted to capture 'hits'
as a sort of measure of interest.
 
If you are interested in how many times the database is accessed rather than
how many times a form is opened, you can use the same methodology, but in a
different place. The database may be open, but a form can be accessed
multiple times during a session. This would cause an inflated number.

The logic to increment the number could be put in a form that is referenced
in Tools, Startup. That form should open only when the database is open.
Use it to open your main form. This way, you will only get a count when the
database is opened.
 
Thanks Klatuu - wisdom from another world...

Klatuu said:
If you are interested in how many times the database is accessed rather than
how many times a form is opened, you can use the same methodology, but in a
different place. The database may be open, but a form can be accessed
multiple times during a session. This would cause an inflated number.

The logic to increment the number could be put in a form that is referenced
in Tools, Startup. That form should open only when the database is open.
Use it to open your main form. This way, you will only get a count when the
database is opened.
 
Back
Top