Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use VBA to update a record

Status
Not open for further replies.

kryptor

Programmer
Sep 19, 2004
65
GB
Hello all, I am trying to use MS Access to create a Barcode attendance tracking system.

What I'm looking to do is to track the USER, Date, Time, In/Out. I have the barcode device setup and works with the barcodes I want to use, I have a database setup that accepts the barcode data, inserts the name, date and time.

My problem is with the IN/OUT section, I need to be able to add a record when the user is IN, then update the record when the user leaves, but in order to do this all I can think of is searching to see if the user, date and IN/OUT field exists, then update the IN to be OUT.

If anyone understands please can they help out.

Thanks
Me a confused Access person once more :S

If @ 1st U don't suceed then I guess your not a bird :p
 
I think you may need separate In and Out records that can be matched in reports. Updating an In with an Out could be incorrect, as people may forget to either check in or check out. When this occurs, a record can be created and marked appropriately. As far as I recall, there is a lot of software that does this sort of thing.
 
I must agree with Remou.
But I imagine that every person is known to the system with a unique ID, so if a person is IN you surely must an empty OUT field for that person. If that IN date matches with the OUT date, the person is on the way out, update the OUT field, if not, add a new record.

Herman
Say no to macros
 
hermanlaksko
What about a person that has gone out to meeting or lunch, but forgets to log out, logs in again and then logs out later on? Then there is the person who forgets to log in but remembers to log out for the day. It seems to me that finding the correct record might be difficult.
 
Hmm I'm still in a confused state - what would you recomend taht I do, have 2 separate IN/OUT fields??

Also I'm still a little confused as to how having 2 spearate fields will help me in this case anyway, I will still have to search the database to find if the person is coming in or going out.....

Arghhhh why was I plagued with this problem !!!!!

If @ 1st U don't suceed then I guess your not a bird :p
 
I was suggesting two records with a flag on the person to say whether they are In or Out. An In person has an Out record written and so on. I think a confirm would be needed, to allow for people forgetting to check in or out.

If you want to find the latest record for a person, the Max of the date/time field in the logging table should suit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top