this is my first time posting a question on this forum. I have been struggling with writing a query in Microsoft Access for a week now and I hope someone here can help me out. I am building a time attendance application using fingerprint in vb6.
The table looks like this:
https://i.stack.imgur.com/MZcwI.png
As you can see in the table an employee can check in and out more than 2 times a day. My question is: How can i determine in the OriginType column which row is IN or Out? When a employee checks in for the first time the OriginType should be "I". When he checks in for the second time the OriginType should be "O". When he checks in for the 3th time the OriginType should be "I" again and so on.
2nd question which is different from the last one.
I want to write a query that selects from the timeInOut column. I would like the table to look like this:
https://i.stack.imgur.com/GgAhx.png
As you can see there are 2 new columns now and there's no OriginType column anymore. I still want to use the correlated subquery and the modulus operator. When it's a checkin i want it to be placed in the column "CheckIn" and if it's a checkout i want it to be placed in the column "CheckOut".