Solved

AfterUpdate Event - Access

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
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…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

759 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now