OH. MY. GOD. This is pissing me off too much now.
It works with 1 employee and 1 shift. But for some reason when I add another employee it goes straight to clocking them in even if they should be clocking out. I'm not asking for help this time unless anyone really wants to cus I think I'll give up and do something simpler. I've learned all about getting out of loops and putting outputs into my code to see where its going so this hasn't been a total waste of time i spose.
Also, with this method, it might find a record with a clock in and clock out, but there might be another record on the same day for that user where they have not clocked out but it wont get to that one cus of the previous record!

ah well.