Results 1 to 8 of 8
  1. #1
    torontoraptor is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    5

    After Event for Form Error!!"The Expression After Update you entered as the event...

    ok so i built a code for the after event for a specific field in my form. just to do a test run, i inputted Msgbox "helloworld"in VBA but for some reason when I run it with a specific field or any field in the form (i tried different ones) such as a dropdown box or any input field, it gives me the error message:



    "The Expression After Update you entered as the event property setting produce the following error: A problem occurred while Microsoft Access was communicating with the OLE server or ActiveX Control.
    *The expression may not result in the name of a macro, the name of a user-define functions, or [Event Procedure].
    *There may have been an error evaluating the function, event, or macro. "

    how do i fix this???

  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,898
    Show your attempts, should be like:

    MsgBox "Some text here " & Me.textboxname & " and more text here."
    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
    torontoraptor is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    5
    What do you mean? It's just simple a Msgbox , i tried even a test button on the form and its giving me the same error message.
    I wrote the same code on a blank form and blank database and it worked. Is there something wrong with the settings in my form/table thats causing such an error?
    Last edited by torontoraptor; 05-08-2014 at 07:20 AM.

  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,898
    You want a popup message box? You want to include value from a control in the message? That's what my example shows.

    If it works in one database but not another then conclusion there is something wrong with db is reasonable.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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
    torontoraptor is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    5

    file attached

    ok i have attached the database, when you open the form, change the visual inspections and watch the error pop up.

    thanks
    Last edited by torontoraptor; 05-08-2014 at 03:06 PM.

  6. #6
    torontoraptor is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    5

    stupid glitch!!!the expression After Update you entered as the event property setting

    Hi,

    Ive been trying to fix this glitch for hours now and cant seem to find the problem. Im simply putting a message box to test the after update event and its giving me the error "The expression After Update you entered as the event property setting produce the following error: A problem occurred while Microsoft Access was communicating with the OLE server or ActiveX Control.

    Im posting a picture of the error and the code..i tried also putting a simple button on the page that gives a Msgbox on click and its also giving the same error so whats wrong??

    can someone please tell me a fix for this? i tried coping everything into a new form also and still same error
    Attached Thumbnails Attached Thumbnails dberror.png  

  7. #7
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Two things to check here. Check your references and see if OLE is registered, 2nd is your db is in a trusted location. Also;



    One cause can be putting VBA code in the event property instead of in the event itself in the VBA Window.
    Do you have any (perhaps accidental) ActiveX controls on the form?
    Are you using OLE Automation in the code-behind?
    Last edited by burrina; 05-08-2014 at 10:09 AM. Reason: A couple more things

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    I created another form in your db with a button to run MsgBox. It works.

    I created another form and copy/pasted everything from the first form to the new form. Same error occurs.

    I created another form and copy/pasted only the Visual Inspections combobox. Weird part is even tho the form does not have RecordSource the combobox does not show the green triangle error indicator. I unbound the combobox and the AfterUpdate code works.

    I created another form with same RecordSource and pulled controls from the field list. Code still errors.

    I created another form, bound it to All_Info table (not query or SQL statement), created combobox, bound it to Visual Inspections field, added code, it works.

    I did not use any of the design wizards (I never do).

    I conclude corruption is beyond recovery and suggest you start over from scratch.

    BTW, the quote marks are not necessary in the combobox ValueList.
    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.

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

Similar Threads

  1. Replies: 5
    Last Post: 07-10-2013, 05:07 AM
  2. Replies: 0
    Last Post: 03-11-2012, 09:19 AM
  3. Replies: 13
    Last Post: 12-05-2011, 05:10 AM
  4. Replies: 12
    Last Post: 06-14-2010, 08:39 PM
  5. Replies: 21
    Last Post: 06-03-2009, 05:54 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