Results 1 to 4 of 4
  1. #1
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544

    Question .Edit function in Access 2007

    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

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I would start by disambiguating your Dim statements:
    Dim db As DAO.Database, RS As DAO.Recordset, rs1 As DAO.Recordset, rs2 As DAO.Recordset, rs3 As DAO.Recordset

  3. #3
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    That did it, thank you.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Great! Glad we could help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Vlookup function in access
    By rici7 in forum Forms
    Replies: 1
    Last Post: 10-16-2010, 04:41 PM
  2. Replies: 1
    Last Post: 03-18-2010, 09:12 AM
  3. Cannot edit reports in Access 2007
    By sconard in forum Reports
    Replies: 3
    Last Post: 12-23-2009, 08:06 AM
  4. Replies: 0
    Last Post: 11-17-2009, 02:35 PM
  5. to_char function in Access?
    By Amber_1977 in forum Queries
    Replies: 0
    Last Post: 01-20-2009, 04:45 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums