G
Guest
I'm attempting:
Private Sub Form_AfterInsert()
Dim strSQL As String
strSQL = "INSERT INTO YrTotals (EmpID,Year,VacInclu,FloatInclu) VALUES (" & Forms!Employees!EmployeeID & ", '" & Year(Date) & "', 80,16)"
CurrentDb.Execute (strSQL)
Me.Requery
End Sub
but i keep getting a:
Run-time error '13':
Type mismatch and it looks to be with the Year function.
Any suggestions/solutions would be appreciated.
TIA
Private Sub Form_AfterInsert()
Dim strSQL As String
strSQL = "INSERT INTO YrTotals (EmpID,Year,VacInclu,FloatInclu) VALUES (" & Forms!Employees!EmployeeID & ", '" & Year(Date) & "', 80,16)"
CurrentDb.Execute (strSQL)
Me.Requery
End Sub
but i keep getting a:
Run-time error '13':
Type mismatch and it looks to be with the Year function.
Any suggestions/solutions would be appreciated.
TIA