Access Project Reports

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

Guest

I have created a report showing the number of shares for each shareholder
with a sum of the total shares.

One field in the row is to show "Outstanding" shares. I need to show the
total of just "Outstanding" shares. I can create an "IIF statement" on the
row to exclude any shares not outstanding:
=Iif([outstanding]=-1,[noshares],0. This works and gives me a field showing 0
if the shares are not outstanding and the correct number if they are.

How do I get a SUM of these outstanding shares? I have tried putting the
formula in the query; putting the formula in the table; and doing a SUM a
field in the footer. One error message I get says I can't do a formula that
isn't a number, but how would I set the datatype. I set the format to a
number.

Help.
 
Norma said:
I have created a report showing the number of shares for each shareholder
with a sum of the total shares.

One field in the row is to show "Outstanding" shares. I need to show the
total of just "Outstanding" shares. I can create an "IIF statement" on the
row to exclude any shares not outstanding:
=Iif([outstanding]=-1,[noshares],0. This works and gives me a field showing 0
if the shares are not outstanding and the correct number if they are.

How do I get a SUM of these outstanding shares? I have tried putting the
formula in the query; putting the formula in the table; and doing a SUM a
field in the footer. One error message I get says I can't do a formula that
isn't a number, but how would I set the datatype. I set the format to a
number.


Try using:

=Sum(IIf([outstanding], [noshares], 0))
 
That should work and does in Access, but in Project I get an error message
stating the field has to be numeric. I don't exactly know how to make it
numeric.

Thank you.

Marshall Barton said:
Norma said:
I have created a report showing the number of shares for each shareholder
with a sum of the total shares.

One field in the row is to show "Outstanding" shares. I need to show the
total of just "Outstanding" shares. I can create an "IIF statement" on the
row to exclude any shares not outstanding:
=Iif([outstanding]=-1,[noshares],0. This works and gives me a field showing 0
if the shares are not outstanding and the correct number if they are.

How do I get a SUM of these outstanding shares? I have tried putting the
formula in the query; putting the formula in the table; and doing a SUM a
field in the footer. One error message I get says I can't do a formula that
isn't a number, but how would I set the datatype. I set the format to a
number.


Try using:

=Sum(IIf([outstanding], [noshares], 0))
 
Norma said:
That should work and does in Access, but in Project I get an error message
stating the field has to be numeric. I don't exactly know how to make it
numeric.

I thought the field was already a number??

I don't know what will or won't work in an ADP, but you
could try using =Sum(IIf([outstanding], CLng(noshares), 0))
--
Marsh
MVP [MS Access]


Norma said:
I have created a report showing the number of shares for each shareholder
with a sum of the total shares.

One field in the row is to show "Outstanding" shares. I need to show the
total of just "Outstanding" shares. I can create an "IIF statement" on the
row to exclude any shares not outstanding:
=Iif([outstanding]=-1,[noshares],0. This works and gives me a field showing 0
if the shares are not outstanding and the correct number if they are.

How do I get a SUM of these outstanding shares? I have tried putting the
formula in the query; putting the formula in the table; and doing a SUM a
field in the footer. One error message I get says I can't do a formula that
isn't a number, but how would I set the datatype. I set the format to a
number.
Marshall Barton said:
Try using:

=Sum(IIf([outstanding], [noshares], 0))
 
Back
Top