Please add some text messages to your forms advising what is supposed to happen. Not easy to find errors when the expected outcome is unknown.
When you use sql in your vba code, creat a query first in your database to perform the task you expect your code to perform.
If the query works, then use the sql of that to be the base for your vba sqlString.
This should mean errors will be vba syntax rather then fundemental sql data select issues ie the sql won't supply the result you require.
AttendanceLog form has Month Year From To controls and labels that are hidden until Custom Period is selected.
You have On Click events for the two From text box controls.
I think these should be either After Update or No event at all and you have a command button to click for the event to occur If the two controls have a value.
The On Click Event will Fire as soon as you Click on the control which is before you have entered any data and you presumably require both controls to be updated before the Event takes place, hence my suggestion of a Commend Button. This could be Visible only when both of the controls have a value.