Results 1 to 4 of 4
  1. #1
    asterismw is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2011
    Posts
    5

    Me not picking up new columns in table

    I'm very new to Access/VBA, so I apologize if this is a very stupid question, but I can't find the answer anywhere. I have a table to which I've added a column, and Me is not picking up on the new column. When I try to do, say,



    MsgBox Me.NewColumn

    it just gives me an error message saying "Method or data member not found". I also have this problem with a renamed column; Me.NewName doesn't work, but oddly enough Me.OldName still does (and shouldn't, since OldName doesn't exist anymore). Me works with all the other columns in the table; in fact, I added a column earlier today and Me picks it up just fine. Is there something basic I'm missing, or something I can do to force Me to recognize the new/renamed columns?

  2. #2
    asterismw is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2011
    Posts
    5
    I think I figured this out. It didn't work because I didn't (and still dont, really) understand Me. But if my logic is correct, Me was referencing the form, but the form had no reference to the column in the table. Once I added a hidden text field that referenced NewColumn, I was able to use Me.NewColumn. Not, perhaps, the most elegant solution, but it works.

  3. #3
    mlawson6128 is offline Novice
    Windows XP Access 2002
    Join Date
    Mar 2011
    Posts
    5
    Try using an explanation point after Me

  4. #4
    asterismw is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2011
    Posts
    5
    Huh. That never occurred to me. I was under the impression that ! and . were interchangeable, and it was just personal preference as to which one you used. But after searching around a bit, it looks like that's not true. I still don't fully understand the difference, and why you can sometimes use one for the other, but I'll have to try a ! next time. I'm not going to worry about it now though, because I just got this database working and I have other projects I need to move on to. But thanks for the suggestion.

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

Similar Threads

  1. Replies: 5
    Last Post: 05-26-2010, 07:13 AM
  2. Deleting empty columns from a table
    By kapil0712 in forum Programming
    Replies: 3
    Last Post: 05-17-2010, 12:35 AM
  3. Table with look-up columns
    By Tallica in forum Database Design
    Replies: 3
    Last Post: 03-02-2010, 02:09 PM
  4. Replies: 3
    Last Post: 01-21-2010, 08:10 PM
  5. Replies: 1
    Last Post: 10-09-2009, 11:52 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