![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Anyone have any ideas for an efficient method/function to count the total number of records in a subDatasheet please? I have a MainForm with a Datasheet sub form that has a subDatasheet (constructed in the Form and not at Table or Query level). Me.MainForm.subControl.Form.subControl.Form.Record setClone.RecordCount of course only returns the sub record count for the selected record on the Datasheet. I need the total subDatasheet records for all the Datasheet records. The Datasheet Record Source is a saved query but with a complex run time generated Filter applied (to the Datasheet form). The subDatasheet Record Source is a saved query with Master/Child links to the Datasheet. I foresee DAO/Domain Aggregate methods as going to be very difficult to construct and slow to update so I just wanted to see if anyone had any ideas. A2K7 but MDB format TIA Jon |
#3
| |||
| |||
|
|
Anyone have any ideas for an efficient method/function to count the total number of records in a subDatasheet please? I have a MainForm with a Datasheet sub form that has a subDatasheet (constructed in the Form and not at Table or Query level). Me.MainForm.subControl.Form.subControl.Form.Record setClone.RecordCount of course only returns the sub record count for the selected record on the Datasheet. I need the total subDatasheet records for all the Datasheet records. The Datasheet Record Source is a saved query but with a complex run time generated Filter applied (to the Datasheet form). The subDatasheet Record Source is a saved query with Master/Child links to the Datasheet. I foresee DAO/Domain Aggregate methods as going to be very difficult to construct and slow to update so I just wanted to see if anyone had any ideas. A2K7 but MDB format TIA Jon |
#4
| |||
| |||
|
|
If the records are related then there should be some method to construct a query to return the count. You would have to Join the queries (record sources) for the main form, the sub-form, and the sub-sub-form and apply a filter to return only the relevant records. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Jon Lewis wrote: Anyone have any ideas for an efficient method/function to count the total number of records in a subDatasheet please? I have a MainForm with a Datasheet sub form that has a subDatasheet (constructed in the Form and not at Table or Query level). Me.MainForm.subControl.Form.subControl.Form.Record setClone.RecordCount of course only returns the sub record count for the selected record on the Datasheet. I need the total subDatasheet records for all the Datasheet records. The Datasheet Record Source is a saved query but with a complex run time generated Filter applied (to the Datasheet form). The subDatasheet Record Source is a saved query with Master/Child links to the Datasheet. I foresee DAO/Domain Aggregate methods as going to be very difficult to construct and slow to update so I just wanted to see if anyone had any ideas. A2K7 but MDB format TIA Jon |
![]() |
| Thread Tools | |
| Display Modes | |
| |