Results 1 to 3 of 3
  1. #1
    chuman vishal is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2013

    Unhappy compile error method or data member not found???

    Hi to all iam having this "compile error : Method or data member not found " in my code and due to this am not able to continue as my from is not running every time i run it it shows this error message Please help .
    here is the codes

    'reinitialise procedure to accomodate a new operation

    Private Sub reinitialise_screen()
    'reinit the textboxes
    txtmerid.Enabled = True

    txtmerid.Enabled = True

    txtprd.Enabled = False
    txtbrnd.Enabled = False
    txtexpdt.Enabled = False
    txtprodt.Enabled = False
    txtprckg.Enabled = False

    'reinit the command buttons
    cmdview.Enabled = True
    cmdadd.Enabled = True
    cmddel.Enabled = True
    cmdmod.Enabled = True
    cmdcncl.Enabled = False
    cmdsave.Enabled = False

    operation = ""

    the bold is highlited please help
    screen shot is attached
    Attached Files Attached Files

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Are you sure that you have a textbox on your form named "txtmerid"?
    Why do you have the same line repeated twice?
    txtmerid.Enabled = True
    txtmerid.Enabled = True
    Using Access 2007
    Proficient in Access, Excel, VBA, and SQL

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Richmond (Virginia, not North Yorkshire!)
    I assume that the line


    was intended to be part of the comment 'reinit the textboxes. If not, what is it? A Function? If it's intended to be part of the comment, and it actually appears in your code like does above, without an apostrophe preceding it, that could be the thing Access is hiccuping on. The Access Gnomes are not known for accuracy when highlighting the actual line of code that causes an error.

    Obviously the Access Gnomes should be able to 'find' Enabled, the Method, so you have to lok at Joe's question, can the Data Member, txtmerid, be found? Is it actually on the Form whose Code Module holds this code? Is it spelled correctly?

    If the answer to all of the above questions is 'yes,' you need to consider that the Textbox has become corrupted. Controls can and do become corrupted. The test and the fix is one and the same; delete the Control then re-create it.

    If none of this works, comment out the line

    txtmerid.Enabled = True

    delete the following line, which is identical, as Joe said, and see if the line

    txtprd.Enabled = False

    errors out.

    Linq ;0)>
    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Error Data macro could not be found
    By RoyLittle0 in forum Access
    Replies: 2
    Last Post: 12-26-2012, 10:50 AM
  2. Method or data member not found
    By papa yaw in forum Programming
    Replies: 5
    Last Post: 12-17-2012, 02:19 PM
  3. Compiler error: Method or member not found
    By JosmithTwo in forum Programming
    Replies: 3
    Last Post: 11-26-2012, 07:10 AM
  4. Replies: 7
    Last Post: 06-08-2012, 09:55 PM
  5. Compile Error: Method or data member not found
    By subtilty in forum Programming
    Replies: 5
    Last Post: 02-09-2012, 07:56 AM

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