Subject Master Detail question
Author Ryan Nilsson-Harding
Hi there,

I have a form with a master-detail setup, but I'm a little confused
about something.

After entering the master data and the focus is now on the detail grid
the master dataset is still in insert mode. (As expected)

When the first detail record is posted (by user simply tabbing to next
detail line to enter second detail record) the master's BeforePost
event fires, but does not fire again until the master dataset is
properly posted (by user clicking UpdateBar tick, say).

To my understanding this is done to ensure the master can be posted
prior to posting the first detail record. After this, the master
remains in insert mode, and only fires the master BeforePost event
when the master dataset is properly posted.

I have code in my Master.BeforePost event which I only want to fire
when the user explicitly posts the master, but it is always being
called when the user has entered the first detail record. (As well as
when they do an explicit post)

My question is:
Does the master actually do a quick post, but then places itself back
into insert mode? And if so, is there a way to differentiate between
an explicit post and this type of post where the dataset returns back
to insert mode?

I hope this made some sense!
Rgds,
-Ryan