Results 1 to 5 of 5
  1. #1
    robs23 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2014
    Posts
    109

    The expression may not result in the name of a macro, the name of a user-defined function.. error

    Hi Guys,



    Every error I got during my adventure with Access had more-less clear cause and solution. Every error but this one:

    Code:
    The expression On Load you entered as the event property setting produced the following error:
    
    * The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
    * There may have been an error evaluating the function, event, or macro
    It seems to be caused by onLoad/onClose event on one of my forms. This error occurs without any apparent cause and go away with any reasonable cure as well. Very often it helps when I clear the field "On Load" on "Event" tab in form's properties and set it back to "[Event Procedure]". Of course it was "[Event Procedure]" before also, but this seems to do the trick most of the time.

    Unfortunately this time it doesn't want to go away. It happens when I try to run .accde file on Windows Server using Access Runtime 2010. I have no idea why, nothing changed in the file and it had been working perfectly well before. At some point it just started to give this weird error.
    I already tried to replace the file with the original one, uninstall/install back Access Runtime, importing all to new database file etc. with no success. It runs well on full Access (both full and runtime version 14.0.6029.1000).

    When I take the .accdb version of the file, it ends up with error:

    Code:
    execution of this application has stopped due to a run-time error
    When I browse other threads about same errors, I'm lead to the conclusion it's about missing reference.. That's kinda weird as it worked perfectly well before..

    Can you help me nail this error? How do I check if any reference is missing on the "runtime" maching?

    I'm attaching a zipped copy of the file. Please press "SHIFT" to omit start-up options.


    Robert
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    You provided a db that won't run. The only form executes code on open that wants to connect to a backend with password control. How can we debug if can't run code?

    I do see drive letter pathing in the Start_Up procedure. This might be source of issue. Does every user have the same path mapped for F:\1356\Common ? Suggest you use UNC pathing instead and mapping is irrelevant:

    "\\server name\1356\common"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    robs23 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2014
    Posts
    109
    Hi,
    I know that. I provided only a server script file that is supposed to update back-end every 5 minutes - back-end itself hasn't been provided as I'd have to remove a lot of data. Besides, if it runs to the stage where it pops up "F:\1356\Common\npdmanager_be.accdb" is not a valid path, it means it runs in your configuration and would work perfectly well if back-end is present. "F:\" is a server disk from the server's point of view (same as e.g. "C:\" is my computer's internal location). This file itself is not distributed to end users, it runs on server and update back-end etc.

    Robert

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    If the db is not distributed, why bother making it an accde? The accdb doesn't indicate a missing reference and I have no idea why accde would nor how to determine what the accde thinks is missing. I've never used runtime or executable database. Sorry.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    robs23 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2014
    Posts
    109
    I forgot to answer here. As it turned out no reference was missing. It helped when I've added a proper error handling to each subroutine and function. Stupid error handling, I'm usually to lazy to include it. Thanks.

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

Similar Threads

  1. User Defined Function Returns Ambiguous Name Error
    By HotsauceHero in forum Modules
    Replies: 8
    Last Post: 10-03-2014, 04:09 PM
  2. How to use User Defined Function in VBA
    By sbehera in forum Programming
    Replies: 7
    Last Post: 05-12-2014, 07:38 AM
  3. Replies: 3
    Last Post: 11-12-2013, 04:13 PM
  4. Replies: 1
    Last Post: 12-14-2012, 12:32 AM
  5. Replies: 4
    Last Post: 06-08-2012, 09:08 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