Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Event processing in Reports

Status
Not open for further replies.

RDS2

Technical User
Jun 6, 2003
44
US
Is there a way to evaluate each chnage in a report page (a row change in a query) and calulate a number based on a vaue contained in that row?

For example Row 1 has a tax calc method of 1 and needs a calulation routine, Row 2 has a method of 2 and needs a separate routine, etc.

I believe that you can do this with a SELECT CASE statement and a variable that sets the value in a control - but how do I have the report do the calculation each time a row in the query is porecessed???
 
For the most part calculations like this should be done in the query. You can use your own functions in a report, for example, a text control can have a control source set to:

=DoSomething([WithThisField])

The format or print event for the Detail section is another place where a record (row) can be processed.
 
It looks like you need a generic/public function that should be located in a public module. You can do as Remou suggested and set the Control Source property to your function.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top