VBA Function as Data Source

  • Thread starter Thread starter Max Pfleger
  • Start date Start date
M

Max Pfleger

Is it possible to populate an entire row of a report via VBA, or even an
entire report?

I know how to use VBA as a datasource for fields, but don't know how to
use it as a datasource for an entire record, report, datasheet, etc.

I am trying to speed up a fairly complex Access application I inherited.

Many reports contain multiple fields which are calculated in VBA. Parts
of the code have to repeat certain procedures thousands of times,
because the code is being called again with each new new field or record.

I could generate an entire recordset or row in a fraction of that time,
but I don't know how to populate a report or datasheet at that level.

Any help or pointers would be appreciated.


Thanks,
Max
 
Yes, expressions and functions can be the controlsource of a control or by
building a recordset in a function, could also populate a row. You might
also redesign the report query to first get the information for the report
from the tables, then in a second query do the calculations on the reduced
resultset.
 
Back
Top