Results 1 to 3 of 3
  1. #1
    weasel7711 is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    25

    RunMacro cannot find submacro object.

    I am running Access 2010 and I am creating a Web Database (so I can't just start typing VBA code)



    I have a form that allows the user to browse through entries in a table in a more aesthetically pleasing way than a datasheet view. I have the default setting so that all the textboxes for the fields are locked. There is an "Edit" button that runs a macro which will allow these textboxes to be locked/unlocked when this button is clicked. I have a TempVar that keeps track of whether the form is currently locked or not. I have a submacro at the end of this macro called SetLocked which sets each text box. When I select the RunMacro command, the submacro does not appear in the drop down list for the RunMacro command. If I put in the macro name manually it throws an error when the macro runs:

    Microsoft Access cannot find the object 'SetLocked'

    and the error number 2485

  2. #2
    weasel7711 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    25
    Does anyone know what could be going on here?

  3. #3
    weasel7711 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    25
    I found a temporary fix. I moved the submacro to its own module and referenced it that way. I still have no way to reference a submacro within it's own module and I can't find any information via my Access2010 book, google, or youtube about how to reference a submacro inside its own module properly.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-03-2011, 07:01 PM
  2. Replies: 1
    Last Post: 04-14-2011, 03:46 PM
  3. Replies: 1
    Last Post: 08-05-2010, 12:11 PM
  4. cant find the object
    By AccessLes in forum Forms
    Replies: 1
    Last Post: 06-30-2010, 12:41 PM
  5. "doCmd - can't find object"
    By drmcfall in forum Access
    Replies: 1
    Last Post: 08-18-2009, 09:41 PM

Tags for this Thread

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