matrixindicator
IS-IT--Management
Hoy,
I have a checkbox in my subform. When I set it to YES (True) an update query should set the actual date in the underlying table.
When A user is clicking in the checkbox and the condition is True update the field Date with (date).
The query itself is working fine, but from in the form is is not working. The moment the user is clicking the checkbox, the record is not already saved and the event After Update is evaluated.
I wonder, how can I save the record before the query is running in the procedure.
Which event should be recommanded in this case After Update ?
I have a checkbox in my subform. When I set it to YES (True) an update query should set the actual date in the underlying table.
When A user is clicking in the checkbox and the condition is True update the field Date with (date).
The query itself is working fine, but from in the form is is not working. The moment the user is clicking the checkbox, the record is not already saved and the event After Update is evaluated.
I wonder, how can I save the record before the query is running in the procedure.
Which event should be recommanded in this case After Update ?
Code:
Private Sub Inv_received_AfterUpdate()
DoCmd.SetWarnings False
DoCmd.OpenQuery "QryODD", acNormal, acEdit
'DoCmd.RunSQL "UPDATE Order_details SET Order_details.[Inv received_date] = Date() " _
'& "WHERE ((([Order_details].[OrderDet_ID])=360 or the name of the subform) And (([Order_details].[Inv received])=True));"
DoCmd.SetWarnings True
End Sub