There is s level 'Finished' that will fire after the data has been committed to the database and before control is returned to the User Interface.
The numeric level is 32000, but there is a constant of 'Finished' for this purpose
Using Jonathan's example:
If level = Finished then
serr1 = CallChks("Form1", "cbatnbrH")
End Sub
Doing it on this level will allow for the trigger to file before the data is reloaded to the screen
------------------------------
Mark Schrier
Information Systems Director
Mackay Communications, Inc
Raleigh NC
------------------------------
Original Message:
Sent: Jul 08, 2021 05:35 PM
From: Jonathan Van Houtte
Subject: Screen refresh after trigger fires on save
Try this:
Private Sub Update1_OnUpdate(ByVal Level As Integer, ByVal InsertFlg As Integer, retval As Integer) If Level = 0 Then serr1 = CallChks("Form1", "cbatnbrH")End Sub
That should refresh the screen, including the grid, whenever a change is saved.
------------------------------
Jonathan Van Houtte
Architect
XLstatements, LLC
Clifton Park NY
Original Message:
Sent: Jul 08, 2021 03:57 PM
From: Gail Jones-Nemeth
Subject: Screen refresh after trigger fires on save
For various reasons, we need to use a trigger to update a field in the GLTran table on an insert or update of a GL Journal Entry.
The trigger is working fine, but the problem is that a trigger does not display until the screen is "refreshed" . For example, after a save, hit "Esc" and answering "No" to message. At that point, the updated field displays correctly.
Does anyone know if there is an easy way to force a screen refresh after a save in a customization?
A code example would be greatly appreciated!
------------------------------
Gail Jones-Nemeth
Financial Systems Analyst
Creative Associates Int'l
Chevy Chase MD
------------------------------