T
Thanks, Chad
Hello, I have an apend query i wanted to use in a module and I cant get it to
work. I tried the code below but gives me an error "Query input must contain
at least on table or query" Thanks!
Public Function RunYearlyReview()
Dim db As DAO.Database
Dim strSql As String
strSql = "INSERT INTO tblYearlyReview ( DateOfHire, FirstName, LastName,
Status, CurrentMonth )" & _
"SELECT tblUser.DateOfHire, tblUser.FirstName, tblUser.LastName,
tblUser.Status, Month([DateOfHire]) AS CurrentMonth" & _
"WHERE (((tblUser.Status)=False) AND
((Month([DateOfHire]))=Month(Now())));"
DoCmd.RunSQL strSql
End Function
work. I tried the code below but gives me an error "Query input must contain
at least on table or query" Thanks!
Public Function RunYearlyReview()
Dim db As DAO.Database
Dim strSql As String
strSql = "INSERT INTO tblYearlyReview ( DateOfHire, FirstName, LastName,
Status, CurrentMonth )" & _
"SELECT tblUser.DateOfHire, tblUser.FirstName, tblUser.LastName,
tblUser.Status, Month([DateOfHire]) AS CurrentMonth" & _
"WHERE (((tblUser.Status)=False) AND
((Month([DateOfHire]))=Month(Now())));"
DoCmd.RunSQL strSql
End Function