I get this error message and I can't figure out why here is the code where I get it.
'--------------------------
Private Sub Find_Employee()
'--------------------------
On Error GoTo errorhandler
Dim SQL As String
SQL = "select * from [Employee Data Table]" & _
"where [EMPID] = '" & strEmpid & "'"
Set gRSEmpData = gDB.OpenRecordset(SQL) ' Employee Data
While Not gRSEmpData.EOF
strOldGrp = gRSEmpData!EMP_GROUP
strOldCls = gRSEmpData!JobID
strOldJRT = gRSEmpData!JOB_RT
strOldRT = gRSEmpData!EMP_RT
strOldFP = gRSEmpData!EMP_FT
strOldStat = gRSEmpData!status
strOldStdt = gRSEmpData!STAT_DATE
strOldJobDt = gRSEmpData!JOB_START
strCheck = "true"
Call Update_Employee_Data_Table
gRSEmpData.MoveNext
Wend
If strEmpid > "17000000" And strCheck = "false" And rectemp2!YAPAST <> "0" Then
Call Add_Employee
End If
If strCheck = "false" And rectemp2!YAPAST = "0" Then
Call Add_Employee
End If
strCheck = "false"
Exit Sub
errorhandler:
Call PrintError
End Sub
Any suggestions?
'--------------------------
Private Sub Find_Employee()
'--------------------------
On Error GoTo errorhandler
Dim SQL As String
SQL = "select * from [Employee Data Table]" & _
"where [EMPID] = '" & strEmpid & "'"
Set gRSEmpData = gDB.OpenRecordset(SQL) ' Employee Data
While Not gRSEmpData.EOF
strOldGrp = gRSEmpData!EMP_GROUP
strOldCls = gRSEmpData!JobID
strOldJRT = gRSEmpData!JOB_RT
strOldRT = gRSEmpData!EMP_RT
strOldFP = gRSEmpData!EMP_FT
strOldStat = gRSEmpData!status
strOldStdt = gRSEmpData!STAT_DATE
strOldJobDt = gRSEmpData!JOB_START
strCheck = "true"
Call Update_Employee_Data_Table
gRSEmpData.MoveNext
Wend
If strEmpid > "17000000" And strCheck = "false" And rectemp2!YAPAST <> "0" Then
Call Add_Employee
End If
If strCheck = "false" And rectemp2!YAPAST = "0" Then
Call Add_Employee
End If
strCheck = "false"
Exit Sub
errorhandler:
Call PrintError
End Sub
Any suggestions?