Solved

AfterUpdate Event - Access

Posted on 2008-10-29
2
260 Views
Last Modified: 2013-11-27
I have a continuous form where I have multiple fields to update or create new records.

The afterUpdate event works when I modify the "txtNo" field, but when I create a new record and add value to "txtNo" the afterUpdate event doesn't work.
Which even works for both, update a record or add a new record?

Private Sub txtNo_AfterUpdate()

     If Not IsNull(Me.txtNo) And Not IsNull(Me.txtDirection) Then
        Me.txtCleForm = Me.txtNo & "-" & Me.txtDirectionID
        Me.txtCleFormS = Me.txtNo & "-" & Me.txtDirectionLien
     End if

End Sub

Thanks,
Carol
0
Comment
Question by:Karl001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 total points
ID: 22833881
AfterUpdate works for both New and Existing records. I use it all the time.

Are you SURE the event isn't firing? Place a breakpoint in the "Private sub" line and see if your code takes you there.
0
 

Author Closing Comment

by:Karl001
ID: 31511301
Thanks, your right. It was a codification issue.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question