Hello everyone, I think this is considered advanced.
I need a little help with my logic. I am writing a very simple employee time clock. I have a form with 6 buttons(clock in, clock out, on break, off break, on lunch, and off lunch) Basically they can hit each button as much as they want as is so I want to do a little advanced logic.
How would I shape the if statements to hide buttons once they have been clicked to only allow for the opposite button to be clicked.
For instance, if I clock in I shouldnt be able to clock in again untill I have clocked out. If I go on lunch I shouldnt be able to click any other button until I have came back from lunch.
I am pulling the records from SQL (ex:
ID User Type Date
34 31 Clocked In 2010-06-13 17:50:59
35 31 Break Start 2010-06-13 17:51:01
36 31 Break End 2010-06-13 17:51:01
37 31 Lunch Start 2010-06-13 17:51:02
38 31 Lunch End 2010-06-13 17:51:03
39 31 Break Start 2010-06-13 17:51:04
40 31 Break End 2010-06-13 17:51:05
41 31 Clocked Out 2010-06-13 17:51:06
Any help would be very helpful, even if its the terms I should use on google since I cant even seem to get the correct search query together to find an answer.
You can choose what buttons to display with sql. Just select what the last one was.
That's the easy part. The hard part is dealing with people forgetting to do something, like clock out from the previous day.
DUH!!! Why didnt I think of that??? jeeze, I guess you know the newbies when you see them huh, lol.
Thanks for the push!