Filter issue in form header

  • Thread starter Thread starter mariner
  • Start date Start date
M

mariner

Guest
I have a basic knowledge of access and therefore not VB conversant. So any advice please keep simple.

I have created a form with which I already total the sum of the value of all records in the form header, using sum function. When filtering the form the expression returns the correct value for the record set filtered on.

What I also want to achive is a total value for certain records within the filter. I have tried DSum function and IIF argument unsuccesfully.

The record information is as follows:

Form name: Reservations
Field to sum: [No]
Condidtion: Where the [SalesItemID]='EP006'

Expression used:

=DSum(" [No] ","Reservations","[SalesItemID]= 'EP006' ")

This does return the correct number of SalesItem=EP006 in the form when the form is unfiltered, although it does not change to display the value of the records in the filtered set.

Anyone give me some not too technical direction.

Many thanks


Mariner


mariner
View Public Profile
Send a private message to mariner
Find all posts by mariner
Add mariner to Your Buddy List

Sponsored Links
 
The IIf function should work Try this

IIF([SalesItemID]="EP006",sum([No],??)

The ?? is the value that you want to return if SalesItemID is not equal to "EP006"
 
Thanks

I have tried that. What I want to achieve is the sum of the values where the [SalesItemID]="EP006" within the filter . The above expression returns the number = to that individual record only.

Any other suggestions

Thanks Mariner
 

Users who are viewing this thread

Back
Top Bottom