Report, loop through records

  • Thread starter Thread starter john
  • Start date Start date
J

john

I'm trying to loop through the records in a query on
the "On Open" event of a report. I'm used to doing this
with forms using the example syntax,

me.recordsetclone.movefirst (example)


If I try this in the 'On open" event of a report, Access
throws an error,

"method or data member not found"


Any suggestions? Thank you, John
 
Hi,
Not sure what you're trying to accomplish but, if you type:
Me.
in the Open event of a report, you do not get recordsetclone as an option in
the
intellisense which means there's no such method, hence the error.

Post back with a bit more info on what you're trying to do and maybe someone
can help.

HTH
Dan Artuso, MVP
 
I'm performing multiple calculations that I want to
display in the report. I've done some of this through the
control source property, but some of the calculations are
quite involve. Thus, I want to loop through the query
table one record at a time and perform the calculations
manually using code. I code just define a DAO.Database
variable, then a recordset, etc. But I was hoping I'd be
able to use the me function as when using forms. For
instance, in the after update event of any control on a
form, I can loop through the underling table using,

me.recordsetclone.movefirst
....ect.

Do you know if this can be done in a report. otherwise
I'll just define a DAO.Database variable, ...

Thanks for your help. John
 
Hi,
Reports is not my area of expertise, but I do know that you can't do things
the way you are
trying to do them. What I would suggest is to re-post your question in:
microsoft.public.access.reports

HTH
Dan Artuso, MVP
 
Hi John,
I suggest that you base your report on a query as the
record source - keep in mind that a query can be based
upon another query. You can then have a calculated field
(s) that call you function(s) record by record.

This approach has the added advantage that more that just
1 report/form/query can use this queries dynaset.

Luck
Jonathan
 
Back
Top