My Assistant
![]() ![]() |
|
|
Jan 28 2005, 11:33 AM
Post
#1
|
|
|
UtterAccess Addict Posts: 115 From: San Francisco, California |
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 |
|
|
|
Jan 28 2005, 12:31 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 1,536 From: Lansing, MI |
The form's Recordsource is a string, not a reference to its Recordset. If you want to get the form's Recordset, use its Recordset property. Also, you don't have to to refer to controls on tabs any differently than other controls. They are still properties of the form itself:
This line: Set rs = Me![report_tab].[Invoices_tbl_subform].Form.RecordSource Shoud be: Set rs = Me![Invoices_tbl_subform].Form.RecordSet OR This line: Set rs = db.OpenRecordset(Me![report_tab].[Invoices_tbl_subform].RecordSource, dbOpenDynaset) Should be: Set rs = db.OpenRecordset(Me![Invoices_tbl_subform].Form.RecordSource, dbOpenDynaset) |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 25th May 2013 - 07:29 PM |