See the commented line...just can't get to this recordset!
Dim db As DAO.Database
Dim rs As DAO.Recordset
'Set rs = Me![report_tab].[Invoices_tbl_subform].Form.RecordSource ' Ive tried thhis line w/o the [report_tab] does not work...same for line below...
Set rs = db.OpenRecordset(Me![report_tab].[Invoices_tbl_subform].RecordSource, dbOpenDynaset)
With rs
Do Until .EOF
Me![Invoices_tbl_subform].Form.fTriggerInvoiceBtn ' this a public function that calls a button on the subform
.MoveNext
Loop
End With
Tim Ferguson - 28 Jan 2005 17:28 GMT
> Set rs = Me![report_tab]. _
> [Invoices_tbl_subform]. _
> Form. _
> RecordSource
A recordsource is a string value; you need a recordset. Try one of
' open a recordset
Set rs = db.OpenRecordset( Me![report_tab]. _
[Invoices_tbl_subform]. _
Form. _
RecordSource, dbOpenSnapshot, dbForwardOnly)
' or access the form's recordset or recordsetclone property:
Set rs = Me![report_tab]. _
[Invoices_tbl_subform]. _
Form. _
RecordSetClone
Hope that helps
Tim F