Solved

AfterUpdate Event - Access

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

822 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