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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selection problem

Status
Not open for further replies.

savok

Technical User
Jan 11, 2001
303
AT
I have an access table that I use in a report, it has a PayID and PayAmount.

I pass PayID from VB to crystal and based on the payID make the selection
{Payments.Pay_ID} = {?PayID}

But i also need to display on the same form a total sum of all PayAmount. How would I select all payments? if I alreayd put that formula in the selection?

thanks
 
You must remove the record selection, since it obviously removes the records you need for the unrestricted total.

You can then create the total for the selected PayID using various options:

One option is to use a Running Total that gets evaluated based on a Formula (like your record selection formula).

Another option is to create a conditional formula
IF ({Payments.Pay_ID} = {?PayID}, PayAmount, 0)
and total it.

Another option is to conditionally suppress all other records...

Cheers,
- Ido

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top