Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2005

Tip: Looking for answers? Try searching our database.

Defining a Recordset for a Subform on a Tabbed Control for a Loop

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
swm - 28 Jan 2005 16:58 GMT
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

 
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.