I have a form with a subform on it that queries a many-to-many relationship (but this would apply to a one-to-many relationship as well). I want to require that the user adds at least one record to this subform.
I believe the issue will be that the main form must update/insert before the subform even gets focus. This means I can’t use BeforeUpdate to check the RecordCount on the subform.
Has anyone found a decent way around this?
In such situations, I use to open a dialog form, where the user must enter the basic information required to insert both records. This form has an OK and a Cancel button. Enable the OK button only when the requested fields have been entered. Then insert both records (the master record and the detail record) programmatically. Only then, you open your main master/detail form (the one with the subform) which now will display both records. The user can now add additional data, if he wants.