Report Header Sum

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to cum the total of the 1D1's, It has about 6 like this 1D1D,
1D1G Etc. I'm using the following:

=Abs(Sum([rctg_stn_id]="1D1*"))

and it is not working.
 
Sum is an Excel function. Access doesn't recognize it.

Try: abs(Dsum("[rctg_stn_id]", "TableName", "[rctg_stn_id] Like '1D1*'"))

I'm not sure you can use wildcards with dsum, so if that doesn't work, try
something like:
abs(Dsum("[rctg_stn_id]", "TableName", "Left([rctg_stn_id],3) = '1D1'"))

Note that you have to replace TableName with the name of the table where the
field [rctg_stn_id] resides.

HTH,
 
KAnoe said:
I would like to cum the total of the 1D1's, It has about 6 like this 1D1D,
1D1G Etc. I'm using the following:

=Abs(Sum([rctg_stn_id]="1D1*"))


You're very close. It's just that you have to use the Like
operator when you compare with wildcards:

=Abs(Sum([rctg_stn_id] Like "1D1*"))
 
Sum is an Excel function. Access doesn't recognize it.

I was having a bad day. In context of the OP, this was a stupid response.

My apologies.
--
George Nicholson

Remove 'Junk' from return address.


George Nicholson said:
Sum is an Excel function. Access doesn't recognize it.

Try: abs(Dsum("[rctg_stn_id]", "TableName", "[rctg_stn_id] Like '1D1*'"))

I'm not sure you can use wildcards with dsum, so if that doesn't work, try
something like:
abs(Dsum("[rctg_stn_id]", "TableName", "Left([rctg_stn_id],3) = '1D1'"))

Note that you have to replace TableName with the name of the table where
the field [rctg_stn_id] resides.

HTH,
--
George Nicholson

Remove 'Junk' from return address.


KAnoe said:
I would like to cum the total of the 1D1's, It has about 6 like this 1D1D,
1D1G Etc. I'm using the following:

=Abs(Sum([rctg_stn_id]="1D1*"))

and it is not working.
 
Back
Top