Solved

AfterUpdate Event - Access

Posted on 2008-10-29
2
262 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 85

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

691 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