Results 1 to 4 of 4
  1. #1
    JosmithTwo is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    19

    Compiler error: Method or member not found


    I get "Compiler error: Method or member not found" on the rstSegments but not on rstAK9. Both reference simple tables. HELP! thanks

    Code:
        Dim rstIN, rstHeader, rstIK5, rstAK9, rstSegments  As Recordset
    
       Set rstAK9 = db.OpenRecordset("tbl_999_040_AK9")
       Set rstSegments = db.OpenRecordset("tbl_999_020_ErrSegments")
    
                Case "CTX"
                    rstSegments.AddNew
                    rstSegments.CTX_ErrDescp = !field01 '<<err here 
                                               'Compiler error: Method or member not found
                    rstSegments.Update
                Case "AK9"
                    rstAK9.AddNew
                    rstAK9.ID_file = xID
                    rstAK9.ID_Set = xAK2Ctl
                    rstAK9.AK9_ErrCd = !field01 <<No err here
                    rstAK9.Update

  2. #2
    JosmithTwo is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    19
    Found it myself. rstSegments!CTXErrDescp = !field01 works. I'm still not sure why.

  3. #3
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    It wasn't !Field01 that was generating the error - it was .CTX_ErrDescp. On your second example, you don't have the underscore character (i.e. !CTXErrDescp) and it works, which means that the field name in the rstSegments recordset is CTXErrDescp, not CTX_ErrDescp.

    John

  4. #4
    JosmithTwo is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    19
    Wow! I'm impressed that you looked at the prior example. You're right in that the underscore was a problem, but with that corrected, it still demanded the "!".

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

Similar Threads

  1. Outlook error message using SendObject method
    By Juan23 in forum Programming
    Replies: 3
    Last Post: 07-10-2013, 12:03 PM
  2. Replies: 7
    Last Post: 06-08-2012, 09:55 PM
  3. Compile Error: Method or data member not found
    By subtilty in forum Programming
    Replies: 5
    Last Post: 02-09-2012, 07:56 AM
  4. Compiler WRONG example-DB
    By pacala_ba in forum Access
    Replies: 12
    Last Post: 04-18-2009, 01:00 PM
  5. Replies: 2
    Last Post: 02-28-2009, 03:31 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