Solved

AfterUpdate Event - Access

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

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.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

830 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