Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2008
    Posts
    5

    VB code in Access '07 trouble

    Hi, Just made the switch from Access '03 to '07, and the transistion isn't going well. I guess I will start with the VB code. Everything worked in '03, but when I switched to '07 and opened a report, I got the following error:
    The expression On Format you entered as the event property setting produced the following error: A problem occurred while Microsoft Office Access was communicating with the OLE server or ActivX Control.


    *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.
    This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired.
    A custom Macro in this report has failed to run, and is preventing the report form rendering.
    I am able to open VB, and compile the code, but the debug tool doesn't work at all. The code is basically defining colors with RGB values, and changing the back color of certain text boxes to the defined color stored in table values. I am getting a security error when I open the report, and wants to know if I trust the sorce and enable ActivX and macro, or allow Access to filter it. I have been clicking trust the source, but it still asks me each time I open it. I can view the layout and the design view, but not open the report. Thanks for any help. Paul

  2. #2
    Join Date
    Dec 2008
    Posts
    5
    Just a few updates on things I have tried.

    The database was created in 2003, and converted to 2007.
    In the trust center, I have added the file path to the trusted locations.
    I have allowed macros to be enabled without prompting.

  3. #3
    Join Date
    Dec 2008
    Posts
    5

    Figured it out

    I did figure out this problem. It looks like it was some sort of Access glitch. I copied the bad report (named card), pasted it (which gave it a name of copy of card), and deleted the original report called card. Now when I open the new report, it opens just fine and all my code works. Someone said they thought the code got out of sinc or something.

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

Similar Threads

  1. Access 2.0 Viewing Code
    By wollydog in forum Access
    Replies: 0
    Last Post: 12-03-2008, 07:50 AM
  2. Code Trouble?
    By briancb2004 in forum Access
    Replies: 0
    Last Post: 10-08-2008, 04:47 PM
  3. Replies: 0
    Last Post: 08-16-2008, 09:10 PM
  4. Replies: 0
    Last Post: 05-18-2007, 02:49 PM
  5. Using SELECT query within a VBA code in Access
    By championss in forum Programming
    Replies: 4
    Last Post: 10-23-2006, 05:50 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