Question : How to Detect Movement from a Datasheet to a SubDataSheet

In an Access XP ADP, I have a main form (frmMain) with a subform (fsfrFeature). The subform is only displayed in datasheet view. The subform is a recursive subform, i.e. it contains another subform whose source object is also fsfrFeature. This lets me easily do a bill of materials type user interface (as a side note this apparently can't be done in a mdb). I also have some code attached to the Form_Current event of fsfrFeature. As I move from 1 record to another on the subform, the code in Form_Current fires as expected. However, if I expand the current current record in the current datasheet and click in any record of the newly visible subdatasheet, the Form_Current even for the subdatasheet does not fire. But if I then move to another record in the subdatasheet, the Form_Current event fires properly. If I then click in the parent record for the current subdatasheet record, the Form_Current event of the parent datasheet does not fire. So, how can I detect that the user has moved from one level of subdatasheets to another? Also, if I'm in a subdatasheet row and I collapse any level above it, I have the same problem. I need to know because the Form_Current event changes the recordsource for a popup form that is associated with the current row of the current subdatasheet.

Answer : How to Detect Movement from a Datasheet to a SubDataSheet

Closed, 500 points refunded.
Lunchy
Friendly Neighbourhood Community Support Admin
Random Solutions  
 
programming4us programming4us