Home  Fees/Services  Access Examples  Tutorials  Access Download  Articles  Search  Contact  Privacy  Links
Custom Database Design Consultants
 
Access Programming Examples
 
Access Example Downloads
Access Form Events Access Event Coding Examples
Form Event Programming
Access VBA Events

 Database Tutorials > Form Event Tutorials > After Update Event

                               

After Insert Event
After Update Event
Before Update Event
On Change Event
On Close Example
On Current Event
On DblClick Event
On Error Event
On Exit Event Help
VBA Timer Event
Undo Event Method


AfterUpdate Event MS Access Example

Form events offer you the power to control all aspects of the user interface including control over navigation, implementation of data integrity and validation procedures through visual basic event programming.
Afterupdate event is triggered and the entire record is updated and the data is saved in the database when:

  • The control loses the focus

  • The user presses ENTER or TAB

  • The focus leaves the record

  • The user clicks Save Record on the Records menu

AfterUpdate Example:

In this AfterUpdate event example we requery a grand total field on the master form after records are updated in the detail form:

Private Sub Form_AfterUpdate()
    Form_F_Order_Total_Price.Form.Requery
End Sub

Note: When validating form field values it is important to know that the OldValue property isn't set to the updated value until after the event for the form occurs.

If you decide to cancel the update the value of the OldValue property replaces the changed value in the control.

More AfterUpdate Examples & Discussion:

Current Value Previous Field Value

Access database calculations - compare old vs new form field values. ... Finally in the After Update event we have both the new and old values available for ...
www.blueclaw-db.com/access_database_calculations.htm

Global Variables as Query Parameters

This is easily done by adding the following line of code in the After Update event... GBL_Project_ID=Project_Combo. In the query there's no more trying to ...
www.blueclaw-db.com/access_pass_parameter_global_variable.htm

Inventory Database Multi-User Example

Private Sub Qty_Out_AfterUpdate()
Dim db As DAO.database ' note that we always use DAO database and recordset operations because we always use Microsoft Jet databases.
www.blueclaw-db.com/download/multi-user_inventory.htm


Contact Information

Event Procedures in MS Access
Microsoft Access 2003 2000 2002(XP) 97 All Windows Versions