counters

counters

am 28.10.2007 23:36:07 von frontiermart

Hi i wonder if anyone can point me in the right direction.
I am trying to design a system using a barcode scanner to scan
membership cards, which pulls a specific record out of a table to
display as a form.So far this is ok what i want to do is record the
number of times this record has been accessed, and the last date it
was accessed on so i can keep track of attendance and card usage.I am
using a query with a filter to pull the specific record from the table
but as my novice status shows i cant work out how to log this event in
the specific table record.
Any pointers would be much appreciated.
Cheers
Mart

Re: counters

am 29.10.2007 00:30:46 von Bob Quintal

frontiermart@btconnect.com wrote in
news:1193610967.323019.37650@v3g2000hsg.googlegroups.com:

> Hi i wonder if anyone can point me in the right direction.
> I am trying to design a system using a barcode scanner to scan
> membership cards, which pulls a specific record out of a table to
> display as a form.So far this is ok what i want to do is record
> the number of times this record has been accessed, and the last
> date it was accessed on so i can keep track of attendance and card
> usage.I am using a query with a filter to pull the specific record
> from the table but as my novice status shows i cant work out how
> to log this event in the specific table record.
> Any pointers would be much appreciated.
> Cheers
> Mart
>
Basically what you want to do is get the existing attendance count
from the membership record, add 1 if it contains a number, or put 1
if it is null, and put the current date and time into the table.

Not knowing exactly what you are doing to retrieve the record, I'd
say the most probable way is to put the statements to update the two
textboxes with those values in the form's before update event, and
put a big "Save" button on the form

The before update event would simply contain the
update statements

me.txtAttendanceCount = nz(me.attendancecount,0) +1
me.dtLastAttendance = now()

and the button's code would be
me.dirty = false

But better than that, create a new table with 2 fields, the
membershipID number and the AttendanceDate.
Add a record for each attendance. This gives a list of who attended
what, which may prove more useful than just the count. You can also
get the number of events and the lastAttended date from this sub-
table by getting the count and max(attendanceDate) via Totals
query.




--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com