'data type mismatch in criteria expression' (1 Viewer)

emartel

Registered User.
Local time
, 20:33
Joined
Jan 15, 2005
Messages
48
in a query I am calculating DateDiff. I have an expression which puts a price into a column if datediff < 30. When I try to total that price in a report (in the groupby footer), with the expression =sum([thenameofthatpricecolumn]) I get a 'data type mismatch in criteria expression' error.
I have tried changing everything I can think of to sort the problem out, but it's now driving me insane. If you can help, I will be extremely grateful.

many thanks
 
R

Rich

Guest
You can't Sum calculated fields in that way, either use a hidden textbox with the running sum property or use =Sum(Iif([YourCriteria]<30,[YourField],0))
 

emartel

Registered User.
Local time
, 20:33
Joined
Jan 15, 2005
Messages
48
Many thanks.

What is the running sum property?
 

emartel

Registered User.
Local time
, 20:33
Joined
Jan 15, 2005
Messages
48
Aha! Thanks - (fingers moving faster than brain)
 

Users who are viewing this thread

Top Bottom