Results 1 to 8 of 8
  1. #1
    uronmapu is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    124

    Help me Error: Compile error: Method or data member not found


    Help me Error: Compile error: Method or data member not found when create Update button


  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    It would help if we could see all the code.
    Is there a field called 'Mobile' on your Form [I'm assuming the 'Me' refers to a Form].

  3. #3
    uronmapu is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    124
    Yes, I have Mobile field in Form tblContacts

    My Code:

    Private Sub cmdUpdate_Click()
    CurrentDb.Execute " UPDATE tblContacs SET Mobile = '" & Me.Mobile & "' WHERE ID = " & Me.RecordID

    DoCmd.Close acForm, Me.Name

    End Sub

  4. #4
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Quote Originally Posted by uronmapu View Post
    Yes, I have Mobile field in Form tblContacts
    My Code:
    Private Sub cmdUpdate_Click()
    CurrentDb.Execute " UPDATE tblContacs SET Mobile = '" & Me.Mobile & "' WHERE ID = " & Me.RecordID

    DoCmd.Close acForm, Me.Name

    End Sub
    Is it tblContacts . . . or tblContacs ?

  5. #5
    uronmapu is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    124
    Sorry, It's tblContacts, I edited, but the same, pleasee image below



    I have a Title field in tblContacts

  6. #6
    PRMiller is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    St. Paul, MN
    Posts
    16
    Sometimes Access can get a little funky. Try a decompile before going further, see if that doesn't resolve the problem: http://stackoverflow.com/questions/3...-and-recompile.

  7. #7
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    It's not supposed to matter, but try changing Me.title to me!Title. At least then the compiler won't try to find a method called .Title. I had that happen just the oper day.

    John

  8. #8
    uronmapu is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    124
    can't to apply in my question

    Thanks,

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

Similar Threads

  1. Replies: 4
    Last Post: 06-08-2012, 09:08 AM
  2. Compile Error: Method or data member not found
    By subtilty in forum Programming
    Replies: 5
    Last Post: 02-09-2012, 07:56 AM
  3. Compile Error Syntax Error
    By Mohamed in forum Access
    Replies: 3
    Last Post: 10-06-2011, 10:12 AM
  4. Replies: 6
    Last Post: 09-28-2011, 09:20 PM
  5. new compile error!
    By darklite in forum Access
    Replies: 6
    Last Post: 09-02-2010, 05:13 PM

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