pauljkeenan
Programmer
What I want to do is to create a report based on the results displayed in a subform following a search.
I found this link from Microsoft about how to print a report based on a recordset.
The problem is, is that you need to enter the "name" of the table/recordset so the report will have a recordsource. the following is the example they give on the site.
' To create a Recordset object based on the Customers table.
Set db = DBEngine.Workspaces(0).Databases(0)
Set rs = db.OpenRecordset("Customers")
But, the results/recordset displayed in a subform dont actually have a name, as a table would have (or do they?). The "customers" above probably refers to the customers table in Northwind thingy.
So my question is, how do we "refer" to the results displayed in a subform, for example the results after searching for maybe all the records beginning with "J". The results displayed dont actually have a name do they? I tried using the control name in the subform where the results are displayed but this didnt work.
does anybody know how to go about this?
thanks in advance lads
paul
I found this link from Microsoft about how to print a report based on a recordset.
The problem is, is that you need to enter the "name" of the table/recordset so the report will have a recordsource. the following is the example they give on the site.
' To create a Recordset object based on the Customers table.
Set db = DBEngine.Workspaces(0).Databases(0)
Set rs = db.OpenRecordset("Customers")
But, the results/recordset displayed in a subform dont actually have a name, as a table would have (or do they?). The "customers" above probably refers to the customers table in Northwind thingy.
So my question is, how do we "refer" to the results displayed in a subform, for example the results after searching for maybe all the records beginning with "J". The results displayed dont actually have a name do they? I tried using the control name in the subform where the results are displayed but this didnt work.
does anybody know how to go about this?
thanks in advance lads
paul