I have a piece of code that was running in Access 2003. However, when I pulled it into 2007 it throws the following error message:
"Compile Error:
Method or data member no found"
It highlights the RS.Edit piece of this code
Code:
On Error GoTo Err_Form_Load
Dim db As Database, RS As Recordset, rs1 As Recordset, rs2 As Recordset, rs3 As Recordset
Set db = CurrentDb
Dim Strmsg As String, Strtitle As String
Dim IntStyle As Integer
Dim stDocName As String
DoCmd.SetWarnings False
DoCmd.Hourglass True
stDocName = "QryUpdateEmpAssign"
DoCmd.OpenQuery stDocName, acViewNormal
stDocName = "FrmCCUAssignEgarn"
DoCmd.OpenForm stDocName, acNormal, , , acFormEdit, acHidden
stDocName = "AAFrmCCUEMP_egarn"
DoCmd.OpenForm stDocName, acNormal, , , acFormEdit, acHidden
Form_FrmCCUAssignEgarn.RecordsetClone.MoveLast
Form_FrmProcess!TxtMyCount = Forms!FrmCCUAssignEgarn.RecordsetClone.RecordCount
Form_AAFrmCCUEMP_egarn.RecordsetClone.MoveLast
Form_FrmProcess!CCUEmpCount = Forms!AAFrmCCUEmp_egarn.RecordsetClone.RecordCount
DAO.DBEngine.SetOption dbMaxLocksPerFile, 40000
Set RS = db.OpenRecordset("QryCCUAssignEgarn", DB_OPEN_DYNASET)
Set rs1 = db.OpenRecordset("QryCCUEmp_egarn", DB_OPEN_DYNASET)
RS.MoveFirst
rs1.MoveFirst
HoldName = RS!RACF_No
updateName = rs1!RACF_No
i = 1
Begin:
RS.Edit
RS!RACF_No = updateName
RS.Update
RS.MoveNext