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:
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 |
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 |
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 |