Can I use an individual record of a DAO.Recordset as Report record
source?
I need to loop thru a recordset (or table or query) opening a
different report for each record in the recordset.
What I am trying to do is create score sheets for an athletic
event where each sub-event has a different form of score sheet.
So it is open-close for each record.
Is there some performance reason that the traditional method of
supplying a WHERE clause as an OpenReport argument is not
sufficient?
While I understand the desire to be efficient, it may be more
trouble than it's worth as assigning a recordset to Access objects
is not nearly as reliable as just filtering a Recordsource.
Also, I have my doubts as to whether it makes sense to walk through
a recordset in the first place. If you format the report
appropriately, you can just load all the records in it and it will
print one instance for each record. Again, this is the traditional
Access approach, and it is likely going to be much easier in the
long run than the setup you're asking about.
It seems to me that a lot of people who come to Access from other
programming environments (I don't know whether that would include
you or not) make things harder than they need to be, because they
never took the time to learn to use Access interactively. Basically,
I create the forms and reports and queries interactively, and only
use code to tie them together. I never assign recordsets from one
object to another object, as I can think of no situation in which
the extra work this takes returns value sufficient to justify it.