Method tiggered with new event in a subform

NT100

Registered User.
Local time
Tomorrow, 03:19
Joined
Jul 29, 2017
Messages
148
I have a main form and a subform, I wanted to know what method will be triggered when i click new in the subform.

I would be grateful for any suggestions.

NT100
 
The sub-form's BeforeInsert event is one possibility, but that typically doesn't fire until you actually type something in the new record. It is possible that NO event will fire. It depends on what you meant by your question.

Clarify please: When you say you click "New" in the sub-form... is that a command button you have created or are you clicking the triangle-asterisk in the sub-form's navigation bar. If the latter, you might have no event until you start populating the new record. However, it is also possible that the sub-form's Activate event would fire when the sub-form gains focus. If the sub-form already had focus, maybe not.
 
"New" means "New (blank) record" in the sub-form's navigation bar. Pls. see the attached photo.

The user clicks this "New (blank) record" to controls of this "new blank record" on the main form. Then I can validate the values entered in the controls.

The attached photo also shows the controls in the main form for the subform's "New (blank) record".

Thanks in advance.

NT100
 

Attachments

  • New (blank) record.jpg
    New (blank) record.jpg
    97.3 KB · Views: 76

Users who are viewing this thread

Back
Top Bottom