toomuchcoffeecoder
New member
- Local time
- Yesterday, 22:08
- Joined
- Oct 18, 2016
- Messages
- 4
I have an Access form that has a datasheet subform that is populated using a table using the code below.
I want to capture the AfterUpdate event so that I apply changes in the temp table to the source tables that the temp_filter_tbl is built from. When I edit a row in the datasheet and click on the little pencil on the right hand side of the datasheet the the corresponding row in the temp_filter_tbl is updated so the update is happening but no events are fired. The AfterUpdate event is not the only event not firing none of the events I try are firing and all of the events are being created in the design view of the data sheet from the properties pane.
Code:
SELECT * INTO temp_filter_tbl FROM (SELECT DISTINCT JobsID, ID, ReferenceDate, Source, Status, NODE, NodeStatus, DocSource, CutOverYear FROM tempTable" & sqlafterwhere & ")"
db.Execute (sql)
Me.CombinationViewDS.SourceObject = "Table.temp_filter_tbl
Me.CombinationViewDS("JobsID").ColumnHidden = True
Me.CombinationViewDS("ID").ColumnHidden = True
Me.CombinationViewDS.Requery
Code:
Option Compare Database
Private Sub Form_AfterUpdate()
Debug.Print "Datasheet After Update"
End Sub
Private Sub Form_BeforeUpdate()
Debug.Print "Datasheet Before Update"
End Sub
Private Sub Form_Click()
Debug.Print "Datasheet On Click"
End Sub
Private Sub Form_DataChange(ByVal Reason As Long)
Debug.Print "Datasheet On Data Change"
End Sub
Private Sub Form_DataSetChange()
Debug.Print "Datasheet On Data Set Change"
End Sub
Private Sub Form_Dirty(Cancel As Integer)
Debug.Print "Datasheet On Dirty"
End Sub
Private Sub Form_Load()
Debug.Print "Datasheet On Load"
End Sub