Okay, I adapted the function, and it does not work as it should...
The records in Table2 need to be unique for the combination WerkDatum (workdate) and Werknemer (UserId), so I changed the code in red to reflect the combination, plus all the other code to get the date field in there, of...