Results 1 to 2 of 2
  1. #1
    kman42 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    40

    Invalid use of me

    I had a lot of code that was running on the detail section of three reports. It was becoming difficult to update the same code on all three reports so I decided to move the code out to a Sub. I copied the code to a standard module and am calling it from the same place the code used to reside.

    Now I am getting an "Invalid use of me keyword" error. Since the code is going to be called from three separate forms, how do I refer to a field on a the form?



    thanks

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You will need to pass the Form name or object to the new routine. This would not be the sase if your procedure was in the code module of the form involved.

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

Similar Threads

  1. Invalid use of Null
    By Wayne311 in forum Programming
    Replies: 4
    Last Post: 01-27-2011, 05:10 PM
  2. invalid procedure call
    By johnmerlino in forum Access
    Replies: 5
    Last Post: 12-13-2010, 10:12 AM
  3. HELP - Invalid number of arguments
    By jgelpi16 in forum Programming
    Replies: 3
    Last Post: 07-22-2010, 09:38 AM
  4. Invalid Use of Null!?!
    By Kipster1203 in forum Access
    Replies: 4
    Last Post: 05-13-2010, 06:09 AM
  5. Invalid Operation
    By ScottG in forum Forms
    Replies: 0
    Last Post: 11-14-2006, 02:05 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