Results 1 to 6 of 6
  1. #1
    willmafingerdo is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    108

    afterupdate error

    Hello,
    Just had a new error pop up on an "Afterupdate" event... when I update the 1032startDate field it is coded to add 15 months to the start date. I have posted pics of my code, the arrow points to the line it keeps telling me my error is at... was wondering if anyone could help point me in the right direction?

    Click image for larger version. 

Name:	error.png 
Views:	25 
Size:	8.4 KB 
ID:	27548Click image for larger version. 

Name:	error 2.png 
Views:	25 
Size:	6.9 KB 
ID:	27549



    Thanks,
    Will

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What is the error description?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    my guess would be it is either field names starting with a number or using the square brackets

  4. #4
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 8 Access 2013
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Make sure the control names does not match the field names for anything used in your VBA code.

    Example:
    Control Name: txt1032FollowUpDate
    Control Source: 1032FollowUpDate

    This helps remove any ambiguity that can confuse Access.


    TIP: Posting the code using the forum code tags is much better. The image makes it very difficult to modify your code. When I preview my post before submitting I can;t see the image anymore.


    In the after update event it would be the following:
    Code:
    Me.txt1032FollowUpDate = DateAdd("m",15, Me.txt1032StartDate
    This code is refencing the text box controls in a way that is not ambiguous to Access. Access won't have to guess.

  5. #5
    willmafingerdo is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    108
    Thanks everyone, I finally got a chance to get back to this.. I ended up deleting the fields off of the form and putting them back on and re-wrote the after update action and its working

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Glad you got it fixed.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. AfterUpdate not firing
    By GraeagleBill in forum Forms
    Replies: 7
    Last Post: 04-24-2016, 11:42 PM
  2. Error checking in AfterUpdate event
    By klnlsu in forum Forms
    Replies: 3
    Last Post: 02-04-2016, 09:50 PM
  3. AfterUpdate not firing
    By newvb in forum Forms
    Replies: 4
    Last Post: 09-29-2011, 04:55 AM
  4. AfterUpdate event code error?
    By agripa86 in forum Programming
    Replies: 3
    Last Post: 08-12-2011, 09:12 AM
  5. AfterUpdate not updating
    By P5C768 in forum Programming
    Replies: 6
    Last Post: 06-10-2010, 02:31 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