Results 1 to 3 of 3
  1. #1
    virgilio is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    81

    New form gives me "Compile Error: Method or data member not found"

    I finished the form that I was working on for the past few days, and plan to use that to template other forms. I changed the record source in the new form to a query that I generated with all of the fields that this form uses.

    Problem: None of my code seems to recognized the "me.fields", I'm getting an error message "Compile Error: Method or data member not found"



    Is this some kind of object oriented programming thing where the text boxes and buttons are still looking for that field name in the old record source?

    Paul

  2. #2
    virgilio is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    81
    Solved my own problem. For the benefit of future searchers here are my notes:

    I overlooked the fields in my new query that were giving me that error. The odd thing was that after I added the needed fields, and then ran and saved my new query, the new form still didn't see the new fields until I 'detached' the recordsource. I did this by changing the recordsource to something else, saving it, then setting it back to my new query and saving it.

    I would love to hear comments from people smarter than I.

    Temporary Edit: How do I mark as solved?

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I'm not answering because I think I'm smarter
    Where is/was "me.fields"? You cannot use Me in query design - only on code behind a form and even then it has to be concatenated. Not in a standard code module either.
    Not clear to me what the problem or solution was based on your posts. Can't say that I ever experienced the issue you solved by changing the data source for a form. It's one of those things that I'd do, experience an issue and say, "oh yeah, forgot to save my design changes when I switched from design to form view". Then you (I) just forget it ever happened, make the fix and move on.
    I think solved is in the thread tools drop down.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. VBA Compile Error Method or data member not found
    By sparker75 in forum Programming
    Replies: 22
    Last Post: 07-26-2018, 06:00 PM
  2. compile error Method or data member not found
    By gunterbrink in forum Programming
    Replies: 9
    Last Post: 01-23-2017, 09:45 AM
  3. Replies: 3
    Last Post: 12-24-2016, 12:42 PM
  4. compile error method or data member not found???
    By chuman vishal in forum Programming
    Replies: 2
    Last Post: 02-26-2013, 01:57 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