The AfterUpdate event should work for fields on subforms. How are you updating the field? Have checked that AfterUpdate still says [Event Procedure], it can sometimes go missing
Public Sub txtFees_Exit(Cancel As Integer)
MyRoutine
End Sub
and
Private Sub txtFees_AfterUpdate()
MyRoutine
End Sub
Neither works in the subform. I am creating a total amount field on the main form. The subform has the various records so when when the fees field changes, or a new record is added and a fee in input, I want the total to reflect that.
Just as a test, try adding an On Click event to the subform control with a message box. Does it work? If so, try steppinh through the After Update event.
The only events the subform have or on enter and on exit. When I go to the form itself I set up an on click event, but it doesn't fire when I click into it when it's a subform.
Oops. I meant subform, not subform control. I constantly use events on subforms, so I wonder if your database has become corrupt?
- Does the code compile?
- Have you tried compact and repair?
- Have you decompiled recently?
Do events work when you create a form and subform in a test database? I guess you checked that the event has [Event Procedure] against it in the property window?
Remou....before I continue. I want to thank you for your responses. I appreciate your thoughts.
So..
The code does compile
I did a repair and compact
I just started t make this database 21 hours ago. I have not decompiled, but doubt that will help. (I will not rule out doing it either) I just think it's something else
I did verify the event procedure is showing up in the events tab property window.
I'm reworking the form to avaoid using a subform. Maybe that will get me to the same place I need to be.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.