Try to create a string variable for your "WHERE" criteria, try this script
Private Sub Form_AfterUpdate()
Dim strCrit as string
Dim strSql As String
'------ Set your criteria here -----
strCrit = <Your criteria>
'------ Define SQL string ---------
strSql = "INSERT INTO ATTENDANCE (SHIFTNAME...